Course details
Python
Core Python end to end — syntax, collections, functions, robustness and objects — then the advanced arc: the object model, generators, decorators, files and encodings, CSV/JSON/SQLite, regular expressions, packaging, logging and testing, built into one real data tool, Quarry. Every AI, data and engineering path starts here.
Course curriculum
Fundamentals14 lessons
Syntax, variables, types, operators, control flow, functions, and errors. You won't just read about them — each lesson you'll write one working piece of a real Bill Splitter & Tip Calculator, and in the capstone you'll wire them into a live restaurant app.
- Basic Syntax & Output10 min
- Variables & Data Types12 min
- Operators & Math12 min
- Working with Strings16 min
- Conditionals16 min
- Loops13 min
- Type Casting & Input13 min
- Functions15 min
- Exceptions & Errors13 min
- Built-in Functions13 min
- Lists, Tuples & Sets16 min
- Dictionaries16 min
- Type Annotations12 min
- Capstone — Bill Splitter & Tip Calculator30 min
Fundamentals Follow-up Projects4 lessons
Four guided builds that use conditionals, loops, functions, exceptions and collections together: a café till, a messy-file CSV analyzer, a budget tracker with alerts, and a text adventure. Each ends in a tested program you finish yourself — the real test before Data Structures & Algorithms.
Objects7 lessons
Everything so far has been data on one side and functions on the other. Objects put them together — and once state and behaviour live in the same place, you can make guarantees about it. You'll build a small bank, and the four pillars turn up as the things you needed anyway: an account that cannot go negative (encapsulation), a savings account that specialises it (inheritance), a billing run with no if/elif chain (polymorphism), a product contract nothing incomplete can slip past (abstraction) — and types that behave like Python's own.
The Object Model4 lessons
Quarry loads batches of rows and hands them from stage to stage, and three kinds of bug keep surfacing that no single line seems to cause: a stage that edits rows another stage was still reading, a lookup that can no longer find a key it stored, and a long run whose memory only ever climbs. All three come from the same place — how Python binds names to objects. This section builds Quarry's inspector, the tool that reports what a loaded batch secretly shares, what can't safely be used as a key, and what refuses to die. You start with identity and binding, then mutability and hashing, then what keeps an object alive and how the collector frees what reference counting can't. The capstone points the inspector at a real batch.
Iteration & Laziness4 lessons
Quarry's sources are bigger than the memory it runs in: a 200 MB server log, an export with a million rows. Reading those into a list first is how a tool runs out of memory at three in the morning. This section teaches Python's answer, which is to hand data over one piece at a time and only when someone asks. You start by writing the iterator protocol by hand, the two methods and one exception behind every for loop. Then generators, functions that pause at each value and keep their local variables while they wait. Then pipelines, generators chained so that one record passes through every stage before the next is read. The capstone joins them into Quarry's feed, which streams a whole file in constant memory and stops reading the moment it has enough.
Closures & Decorators6 lessons
Quarry runs unattended, so every stage needs the same four things around it: a log line, a retry when a source hiccups, a timing, and a cache so the same lookup is never paid for twice. Writing those by hand into every stage is how a codebase rots. This section builds them once, as wrappers. You start with closures — functions that keep a variable alive after the function that made it has returned — because every decorator is a closure. Then you write decorators, decorators that take settings, the standard library's own toolkit in functools, and the calling rules that let one wrapper fit any function. The capstone snaps them together into Quarry's middleware ring.
The Standard Toolbox5 lessons
Five lessons on the modules that replace hand-rolled code: counting and grouping with collections, priority order with deque and heapq, named constants with enum, numbers and randomness with math and random, and the lazy combinators in itertools. None of this is new syntax — it's the standard library doing, in one import, what the last few sections taught you to write by hand.
Data Structures, Lightly6 lessons
A light, Python-first pass over the classic structures every roadmap expects: arrays and linked lists, hash maps, stacks/queues/heaps, binary search trees, recursion, and sorting. Each lesson shows the structure in real Python code and the mistake people actually make with it. This section stays short on purpose — the Big-O proofs, balancing, and deeper structures live in the dedicated DSA course; here the goal is just to recognise the shape and use it correctly.
Functional Python5 lessons
Every function so far has lived in one scope and run its logic with plain statements. This section closes two gaps at once: exactly how Python decides which variable a name refers to (the LEGB rule, and the bugs that come from getting it backwards), and the idioms — lambdas, map/filter/reduce, comprehensions, generator expressions — for writing a transformation as a single expression instead of a loop. It ends by naming the three styles (imperative, object-oriented, functional) every later lesson in this course will keep switching between.
Files, Paths & Encodings6 lessons
Every program eventually meets a folder full of files somebody else made. This section is about meeting it well: finding things with pathlib instead of string surgery, opening them in the right mode, writing context managers so cleanup can't be skipped, decoding text that lies about its encoding, and reading binary formats byte by byte with struct. You'll build Quarry's yard — the part that walks a directory and hands the rest of the program text it can trust.
Serialisation & Storage5 lessons
Everything Quarry knows lives in memory, and memory ends when the program does. This section is about the trip out and the trip back: CSV for the spreadsheets people hand you, JSON for the documents machines trade, pickle for Python talking to itself (and why it must never listen to strangers), and SQLite for data you want to query instead of reread. You'll build Quarry's vault one piece at a time, and the capstone proves the whole trip loses nothing.
Text & Patterns5 lessons
Log lines look structured until you try to read forty thousand of them. This section builds Quarry's extractor: a gate that recognises a real log line, named groups that pull out its fields, substitutions that mask what must not leave the building, a guard against patterns that take exponential time, and finally a parser that turns lines from two different services into one typed record. Along the way you learn what regex is superb at — flat shapes in text — and exactly where to stop and write a scanner instead.
Modules, Environments & Packaging3 lessons
Quarry works — as long as you run it from the right folder with the right command on the right machine. This section turns it into something other people install. You'll learn what `import` really does (find, run once, cache, bind), how packages and relative imports resolve, why every project gets its own virtual environment and a lock file of exact versions, and how `pyproject.toml`, a wheel and one entry-point line turn a function into a `quarry` command on anyone's machine.
Failure & Observability3 lessons
Quarry runs unattended, at night, on files nobody has checked. Sooner or later something goes wrong, and the only question that matters is whether the program tells you what happened — or quietly reports success with zero rows. This section builds Quarry's black box. You'll read the exception tree and give Quarry its own branch of it, chain each error to the one that caused it, make cleanup run on every way out, and replace print with logging that has levels, names and destinations. The capstone wraps a whole run so that a crash leaves behind a report: what failed, where, why, and the last things the program said before it did.
Testing & Debugging7 lessons
Quarry now parses, stores and reports — and every change you make could quietly break a piece you finished weeks ago. This section builds the test rig that stops that from happening. You'll write the tests pytest would collect, give them fresh fixtures and parametrised cases, replace the network and the clock with doubles you control, let random inputs hunt for the case you never thought of, walk a crashed program's frames after the fact, bisect a bad change down to one step — and finish with a runner that reports on the whole suite.
Frameworks & Tooling6 lessons
Everything so far has run inside the browser. This section is honest about the parts of real Python work that can't: the tools that install packages, check types before a program runs, serve a web API, juggle many things at once, or reformat a file. Most of it reads real commands and real code as read-only examples — a requirements.txt, a mypy error, a Flask route. Each lesson still finds the slice that genuinely runs in the browser and builds on it: parsing a version pin, checking a value against an annotation, matching a request to a handler.
Capstone — Quarry1 lessons
Every section since the object model built one piece of Quarry: the inspector, the feed, the middleware ring, the yard, the vault, the extractor, the shipment, the black box and the test rig. Each one works on its own. This capstone wires them into one run that walks a directory of logs, reads each file with retries, decodes it whatever its encoding, pulls fields out with a regex, streams the records into SQLite without holding them in memory, logs everything it had to skip or give up on, and reports. You finish the arc with a working program and tests of your own that prove it.
