Setup
Python ships pre-installed on macOS and most Linux distros. Windows users need one extra step — we still accept them.
Lessons
1
Hello, World!
Every coding journey starts with Hello World. It's tradition, hazing, and a sani…
→
2
Variables & Data Types
Python is dynamically typed, which means you don't declare types — Python figure…
→
3
Control Flow
Python uses indentation to define code blocks. Not curly braces. Not keywords. W…
→
4
Functions
Functions are reusable blocks of code. Write once, call many times. This is the …
→
5
Lists, Dicts & Sets
Python's built-in collections are so good you'll rarely need anything else. List…
→
6
Modules & Packages
Python's standard library is enormous. And if that's not enough, there's PyPI wi…
→
7
Error Handling
Things go wrong. Files don't exist. Users type letters when you expected numbers…
→
8
Mini Project: CLI Todo App
Let's build something real: a command-line todo app that saves your tasks to a f…
→
9
Classes & OOP
Python classes are simpler than Java or C++ — no access modifiers, no header fil…
→
10
File I/O
Python file handling is clean and safe with the "with" statement, which automati…
→
11
Comprehensions & Generators
List comprehensions are Pythonic. They are also extremely easy to abuse until yo…
→
12
Decorators & Functional Tools
A decorator is just a function that takes a function and returns a function. The…
→
13
Type Hints & Modern Python
Python type hints do not make Python a statically typed language — the interpret…
→
14
Python Cheatsheet
The whole language on one page — syntax, collections, idioms. Bookmark this.
→