Correct syntax of file.readlines() is?
A. fileObject.readlines( sizehint );
B. fileObject.readlines();
C. fileObject.readlines(sequence)
D. None of the mentioned
Answer:A
Correct syntax of file.readlines() is?
A. fileObject.readlines( sizehint ); B. fileObject.readlines(); C. fileObject.readlines(sequence) D. None of the mentioned
Explanation: The method readlines() reads until EOF using readline() and returns a list containing the lines. If the optional sizehint argument is present, instead of reading up to EOF, whole lines totalling approximately sizehint bytes (possibly after rounding up to an internal buffer size) are read.