In Python while loop is used when a certain block is to be executed until the condition in while statement is true. A loop become infinite if the condition never becomes false.
Python Course – while loop

Pankaj Kumar
I have been working on Python programming for more than 12 years. At AskPython, I share my learning on Python with other fellow developers.