Practice with the interactive Python tutor
Practice 12 topics: variables, decisions, for and while loops, lists, functions, strings, dictionaries, tuples, sets, comprehensions and exceptions. Each topic includes an exercise, a quiz and step-by-step answers. Your completion tracker saves in this browser.
Start interactive practiceTry the free Python code visualizer
Move beyond the final answer: see the steps that produce it. Paste a short Python program into the Visualizer and follow its variables, output and flowchart one step at a time. Try changing a value, then compare what happens.
Open the free VisualizerThe public Visualizer and free lessons need no account. Libraries that open desktop windows need a Python editor on your computer.
A beginner's path through Python
Start with Python syntax, then learn how if / else decisions choose a path. Explore for loops and while loops before moving to lists and functions.
Follow the beginner's Python guide for an ordered learning path. The complete lesson catalog requires a free learner account and includes quizzes and saved progress.
Learn by predicting, watching and changing
- Read a small example and predict its output.
- Step through the visualization and compare each variable with your prediction.
- Change one condition or input and see how the program takes a different path.
For a comparison with the separate Python Tutor tool, read our Python Tutor alternative page.
