Step 1 of 6

Step 1 · Read and run

A way out

break means leave this loop now. Python jumps straight to the first line after the loop, even in the middle of it.

while True: on its own would loop for ever, because True is always True. With a break inside an if, it loops until something happens. Here, until you type stop.

Run it, type a few words, then stop.

Run the program to carry on.
echo.py

Output

Press Run to see what your program prints.