Q. How do you write an infinite loop in Python?

  • (A) while True:
  • (B) for True:
  • (C) loop forever:
  • (D) repeat:
πŸ’¬ Discuss
βœ… Correct Answer: (A) while True:
Explanation: `while True:` creates an infinite loop.
Explanation by: Mr. Dubey
`while True:` creates an infinite loop.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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