Python | While Loop Quiz | Question 4

Last Updated :
Discuss
Comments

How can you avoid an infinite loop?

By using a for loop instead.

By setting the loop condition to True.

By providing a valid exit condition.

Infinite loops cannot be avoided.

Share your thoughts in the comments