Question: Python code...please help! My ReadLines() function is working fine, but my WriteFile(allLines) is not. Thanks for the help! AttributeError: str object has no attribute readlines

Python code...please help! My ReadLines() function is working fine, but my WriteFile(allLines) is not. Thanks for the help!
AttributeError: str object has no attribute readlines
(The error message Im getting is for line 20 and line 13, both of which are in WriteFile(allLines) function)
 Python code...please help! My ReadLines() function is working fine, but my
WriteFile(allLines) is not. Thanks for the help! AttributeError: str object has no

def ReadLines: fobj = open(inputt, 'r') count = 1en(open(inputt).readlines()) count += 1 return count a1 1 Lines = inputt tdef WriteFile(allLines): file = open(inputt,'w') allLines.readlinesC) for line in allLines: line[3] if 'I': != file.writeCline) rev print('inputt written") ReadLineso WriteFile(allLines)

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!