When to use it
Use Code history when an experiment went wrong and you want to find the version that worked, or to see how a program grew step by step.
Open the history
Select Code history above the editor. A window opens with the code on the left and the list of edits on the right. Each edit shows what kind it was — typed, pasted, undone or redone — and when it happened.
Move through the timeline
- Previous edit and Next edit step one change at a time.
- Drag the Timeline slider to jump to any moment.
- Play replays every edit at the speed you choose, like a recording of your typing.
- Line history shows only the changes to the line you were on; File history shows all of them.
The code preview always shows the program exactly as it was at the selected step.
Get a working version back
Rewind until the version that worked appears, copy the lines you need, close the window and put them back in the editor. Undo and Redo in the toolbar are quicker for the last few changes; Code history is for going further back.
Learning path
The Beginner tutorial breaks a working program on purpose, then rewinds the timeline to find the version that worked.
Good to know
History is recorded in this browser and is not part of share links. Clearing browser data or Clear project history removes it, so export important programs as .py files. Teachers can see the same replay for submitted Classroom work.
Feature overview →