πŸ“Š Python
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

πŸ‘οΈ
63
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
92%
Success Rate