Python, from your first line to your first library
CodeWithPurpose lessons that turn Python into a language you actually think in, not one you look up. Twenty-four chapters, no setup required.

1. Foundations
4 chaptersWhat Python actually is, the one thing you need to run it, and what a name really points at.
2. Working With Data
4 chaptersStrings, lists, tuples, dictionaries, and sets — the shapes almost every program is built from.
3. Controlling the Flow
4 chaptersMaking a program choose, repeat, and remember work as a function instead of a copy-paste.
4. Thinking in Objects
4 chaptersReading your own mistakes, splitting a program into files, and bundling data with the behaviour that acts on it.
5. Working Like a Real Program
4 chaptersTouching the outside world through files, writing collections in one line, and producing values lazily.
6. Going Further
4 chaptersOther people's code, the internet's data format, proving your program works, and building one from scratch.
Open source
Your chapter goes here
Every chapter here was written by a student. Propose your own topic, or fix one that confused you. Drafts stay invisible until they are ready, so nothing you start can break the site.
Keep building your Python practice
These lessons are part of CodeWithPurpose's free learning library, built by students, for students, everywhere.