Interactive Python Lab • Watch Code Run
Python Demo: See Your Code Run Line by Line
A Python program runs one line at a time. In this lab you pick a lesson, then step through it and watch each line change the variables, call functions, build objects and print output. Press Run to execute the same code in real Python in your browser.
Lesson 01
Lesson
Step 1 of 1line
Frames & variables
Printed output so far
Keys: ← → step back / forward, Space play / pause.
Real Python • In Your Browser
Run the Code in Real Python
Run executes the selected lesson in real Python (Pyodide) right in your browser. The first run downloads Python, about 10 MB.
Practice • Think Like Python
Explore
Things to watch for while you step through this lesson.
Want to learn Python from scratch? The Python Foundations course covers it lesson by lesson.