Programming
Python Line-by-Line Executor — Step Execution
Code
Input for input() — one line per call
Runs real Python 3.11 (Pyodide) in your browser. Ctrl+Enter runs; after running, use ← and → to step.
Step through
Press Run to execute the code. The first run downloads the Python runtime (about 10 MB, once per visit).
Programs that run longer are stopped, so an infinite loop cannot freeze the page.
How to use this tool
- 1Type or paste Python code, or pick an example (input() is supported: put the answers in the Input box).
- 2Press Run: the program runs with real Python 3.11 and every step is recorded.
- 3Step with Next and Back (or the ← → keys), or press Play.
- 4Watch the console, the variables and how many times each line has run.
Frequently asked questions
No. The tool runs real Python 3.11 (Pyodide, Python compiled to WebAssembly) inside your browser. The first run downloads the runtime (about 10 MB) once per visit; your code never leaves your device.
Yes. Type the answers in the "Input for input()" box, one line per input() call, before you run the program.
The run is stopped after the step limit (2,000 by default) or six seconds, and you can still step through everything that happened before it stopped. The page never freezes.
Yes. Every step is recorded, so Back, the slider and the ← key move backwards through the run.
Related tools
Python Variable Trace Table Generator
Generate a trace table automatically: one row per executed line, every variable after the line, and its output.
Python Variable Tracker — Track State Changes
Track every Python variable through a run: each value it took, on which line, type changes and a chart for numbers.
Python Stack Frame Visualizer — Call Stack View
See the Python call stack as code runs: frames with local variables, calls and returns, and stack depth over time.
Python Debugging Practice — Find & Fix Bugs
Practise fixing 20 short Python programs with classic bugs, checked by running your fix with real Python.