1.

Which of the following options can be used to read the first line of a text file Myfile.txt? a. myfile = open('Myfile.txt'); myfile.read() b. myfile = open('Myfile.txt','r'); myfile.read(n) c. myfile = open('Myfile.txt'); myfile.readline() d. myfile = open('Myfile.txt'); myfile.readlines()

Answer»

c. myfile = open('Myfile.txt'); myfile.readline()



Discussion

No Comment Found

Related InterviewSolutions