Looping with while
Repeat until a condition changes.
Repeat Until Done
Sometimes you must run code again and again. A while loop repeats its block as long as a condition stays true. 🔁
The while Shape
Write while, a condition, a colon, then an indented block. Mojo rechecks the condition before every pass through the body.
while count < 3:
print(count)