Q. Which method reads all lines from a file into a list?

  • (A) readlines()
  • (B) readall()
  • (C) getlines()
  • (D) fetchlines()
πŸ’¬ Discuss
βœ… Correct Answer: (A) readlines()
Explanation: readlines() returns a list of all lines in the file.
Explanation by: Mr. Dubey
readlines() returns a list of all lines in the file.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
84
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
81%
Success Rate