Question: In python... I think there might be an issue with my code as I keep getting errors. The writefile() function should use the same lines

In python...
I think there might be an issue with my code as I keep getting errors. The writefile() function should use the same lines that were printed from the ReaFile() function. Could someone help me finetune this? Thank you!  In python... I think there might be an issue with my
code as I keep getting errors. The writefile() function should use the

def ReadFileO: file = input("Enter filename : ") num lines 0 with open(file, 'r') as f: for line in f: 1 lines num-lines += print("There are %d in the file %s" %(num-lines , file)) if "_namemain ReadFileO def WriteFile(linesRead): with open('myout.txt', 'w) as f: for line in linesRead: if not line.startswithC'I): f.write(line) print("myout. txt written # solution must be above this comment # do not change any part of the code below def mainO: linesRead = ReadFile() WriteFile(linesRead) if namemain": main)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!