Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)
image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

What was the positive value of Max Weber's model of "bureaucracy?"

Answered: 1 week ago

Question

4. Devise an interview strategy from the interviewers point of view

Answered: 1 week ago