Note that this site is in currently in version 1.0.0-alpha.   Some functionality may be limited.

while loops

Like for loops, while loops are a way of going through items in a list. The difference is that while loops will continue to execute as long as a certain condition is true. To get out of the loop, use the break command, or type control-c or quit() in the interpreter. Otherwise, the loop will keep going.

while True:
    print("Oh no! I'm stuck...")

Tutorials

Tutorial
Check out this demonstration of while loops on w3schools.

Lessons referring to this term