Question: In python: Write a function named ReadFile(no arguments) to read a file (it gets the name by asking user via the input() function). It will

In python:
Write a function named ReadFile(no arguments) to read a file (it gets the name by asking user via the input() function). It will read all the lines in the file as a list of strings and count of how many lines are in it. Finally it will return the aforementioned list of strings. The function header should look like this>
def ReadFile():
Here is an example test run on python IDLE...
 In python: Write a function named ReadFile(no arguments) to read a

Enter filename: /cs/student/joeshmoe/cs8/lab05/myInput.txt There are 16 lines in the file myInput.txt

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!