

InterviewSolution
Saved Bookmarks
1. |
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()The question was asked during an online exam.Asked question is from Files in division Regular Expressions and Files of Python |
Answer» CORRECT choice is (B) infile.read() To EXPLAIN I WOULD say: read FUNCTION is used to read all the lines in a file. |
|