Question: 1)Show the single Python statement to create a file object (myFObj) for a text file called myData.txt that is available for retrieving information from the

1)Show the single Python statement to create a file object (myFObj) for a text file called myData.txt that is available for retrieving information from the file.

2)Suppose the user has been asked to enter the name of their text file, and it is stored in fName. Suppose that the file has been opened and an object of type file has been created called myFObj. Which of the following correctly retrieves information from the text file into a list called tmpList: a. tmpList = fName.readline( ) b. tmpList = myFObj.readline( ) c. tmpList = myFObj.read( ) d. tmpList = fName.readlines( ) e. None of these

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!