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.
Q. Correct syntax of file.readlines() is?
β
Correct Answer: (A)
fileobject.readlines( sizehint );
Explanation by: Mr. Dubey
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.
Discussion
Question Analytics
549
Total Visits
3 y ago
Published
Mr. Dubey
Publisher
88%
Success Rate