In this tutorial, you’ll learn about indefinite iteration using the Python while loop. You’ll be able to construct basic and complex while loops, interrupt loop execution with break and continue, use the else clause with a while loop, and deal with infinite loops.
Iteration means executing the same block of code over and over, potentially many times. A programming structure that implements iteration is called a loop.
In programming, there are two types of iteration, indefinite and definite:
In this tutorial, you’ll:
while
loop, the Python control structure used for indefinite iterationWhen you’re finished, you should have a good grasp of how to use indefinite iteration in Python.
#python