Q. How to read a file line by line using a loop?

  • (A) for line in file
  • (B) file.loop()
  • (C) while file.has_line()
  • (D) loop file.line()
πŸ’¬ Discuss
βœ… Correct Answer: (A) for line in file
Explanation: Using a for loop is the recommended way to read line by line.
Explanation by: Mr. Dubey
Using a for loop is the recommended way to read line by line.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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