Python Programming - Loops - Discussion

Discussion Forum : Loops - General Questions (Q.No. 23)
23.
Which of the following is the correct syntax to define an infinite loop?
for i in range(10):
while True:
while False:
for i in range(1, 0, -1):
Answer: Option
Explanation:
while True: creates an infinite loop, as the condition is always true.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.