CurriculumHow Python Runs Your Code, for KidsOne line at a time
Python Runs Top to Bottom, One Line at a Time
The assistant reads your code top to bottom — nothing skips, nothing jumps ahead.
One line at a time
Before you meet the dragon, meet the one who actually reads your code: the assistant.
The assistant reads exactly like you'd read a letter — top line first, then the next, then the next.
print("First")
print("Second")
print("Third")Output
First
Second
ThirdIt never skips a line, never jumps ahead to a line it likes better, and never guesses what you probably meant.
If you write two lines in the wrong order, the assistant still reads them in the order YOU wrote — even if that looks silly.
print("Goodbye")
print("Hello")Output
Goodbye
HelloSo the order you type your lines in is the order things happen. Always.
Check your understanding
Which order does the assistant read these in?
print("A")
print("B")
print("C")Why: A, then B, then C — always top to bottom, one line completely finished before the next one starts.
print("Goodbye") is written BEFORE print("Hello") here. What happens?
print("Goodbye")
print("Hello")Why: It says exactly what you wrote, in the order you wrote it: "Goodbye" then "Hello" — even though that reads oddly to us.
What you'll practice
The dragon's assistant reads your code exactly like a letter — top line first, then the next, then the next. Nothing gets skipped, nothing jumps ahead. Write three lines that print ONE, TWO, THREE — in that order.
More from this topic
One line at a time is one lesson inside How Python Runs Your Code, for Kids — see the full lesson order and what the whole topic covers.
View the full topic →