To read the entire remaining contents of the file as a string from a file object infile, we use
A. infile.read(2)
B. infile.read()
C. infile.readline()
D. infile.readlines()
Answer:A
To read the entire remaining contents of the file as a string from a file object infile, we use
A. infile.read(2) B. infile.read() C. infile.readline() D. infile.readlines()
Explanation:read function is used to read all the lines in a file. 7. What is the output?