While loops & control

A while loop repeats as long as a condition stays True — perfect when you don’t know the count in advance.

`while condition:` runs until the condition is False. `break` exits the loop early; `continue` skips to the next pass. Always change something inside, or it loops forever.

n = 3
while n > 0:
    print(n)
    n -= 1

More lessons in Pythonic essentials