Learn Python by writing real code
Learn variables, control flow, and loops with one of the most versatile programming languages.
Each chapter explains one idea, shows a worked example and then asks you to write and run your own Python code in the browser, with tests that check your answer.
The Python course is free: every chapter, example and exercise is open without a membership.
Python chapters
- Hello, World!
- Variables
- Control Flow
- Loops
- Lists
- Functions
- Strings
- Dictionaries
- Error Handling
- Classes
- Modules
- Files
- Comprehensions
- Tuples & Sets
- Generators
- Decorators
- Testing with pytest
- Async & HTTP