Question: Python help....would like to leave code the same but unsure of how to solve these errors! Thank you :) def ReadFileO: file = input(Enter filename:
def ReadFileO: file = input("Enter filename: ") num-lines = 0 str= '' with open(file, "') as f for line in f: str = str + line num-lines = num-lines + 1 print("There are %d lines in the file %s" %(num-lines,file)) return str def WriteFile(linesRead): file = open("myout . txt', 'w') for line in linesRead. splitlinesO: if not line.startswith'I' file.writeCline+n) print('myout.txt written) linesRead-ReadFileO WriteFileClinesRead)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
