πŸ“Š Problem Solving and Python Programming
Q. Correct syntax of file.readlines() is?
  • (A) fileobject.readlines( sizehint );
  • (B) fileobject.readlines();
  • (C) fileobject.readlines(sequence)
  • (D) none of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) fileobject.readlines( sizehint );

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.


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