01 · Build the script
Collect expenses in memory, validate amounts, group by category, and print a total through an interactive command loop.
For absolute beginners
Write your first script, practice one concept at a time, and build the same Expense Tracker twice as your skills grow.

13 chapters
13 chapters
Install an interpreter, choose it in VS Code, and run a saved script from an editor and a terminal. Compare the interpreter and working directory when the two routes behave differently.
Pages 9–41 · 5 demos · 5 practice · 4 workshopsGive values names, inspect their types, preserve identifiers as text, and convert numeric inputs explicitly. Keep units in variable names and separate calculations from display.
Pages 42–128 · 32 demos · 5 practice · 4 workshopsRead and reshape text. Use indexes and slices to locate fields, string methods to normalize input, and f-strings to produce readable labels.
Pages 129–191 · 20 demos · 5 practice · 4 workshopsUse Boolean expressions to model a rule. Turn decisions into branches, check exact boundaries, and protect operations that require valid inputs.
Pages 192–252 · 19 demos · 5 practice · 4 workshopsPick collections by purpose. Use a list for sequence, tuple for fixed fields, dictionary for keyed lookup, and set for membership. Watch when mutations are shared.
Pages 253–380 · 51 demos · 5 practice · 5 workshopsProcess repeated data with for and while. Stop or skip intentionally, pair and number records, and switch to comprehensions when the transformation stays clear.
Pages 381–496 · 45 demos · 5 practice · 5 workshopsMove calculations into reusable functions. Design parameters and returns before the implementation, test boundaries, and watch scope and shared mutable values.
Pages 497–616 · 47 demos · 5 practice · 5 workshopsAnnotate expected shapes using built-in generics, unions and aliases. Treat hints as communication to people and tools. Keep parsing and runtime checks explicit.
Pages 638–678 · 9 demos · 5 practice · 4 workshopsReproduce a failure in a small fixture, read the final traceback line and its call stack, then catch the specific condition that your code can recover from.
Pages 679–728 · 12 demos · 5 practice · 5 workshopsWork with paths independently of file contents. Read and write UTF-8 text, decode JSON, verify its shape, and keep missing-file and corrupt-data cases distinct.
Pages 729–786 · 16 demos · 5 practice · 5 workshopsUse the standard library for arithmetic, dates, grouping, sampling, statistics and more. Choose modules by the behavior you need and exercise boundaries with fixed fixtures.
Pages 787–851 · 21 demos · 5 practice · 4 workshopsSeparate files into importable modules and packages. Create a virtual environment, use its interpreter for pip, and connect project metadata to a runnable entry point.
Pages 852–890 · 8 demos · 5 practice · 4 workshopsGive a model a clear state contract. Use instance methods, class constructors, static helpers and representations intentionally, then organize a program around cooperating objects.
Pages 891–966 · 25 demos · 5 practice · 5 workshopsBuild in two milestones
Collect expenses in memory, validate amounts, group by category, and print a total through an interactive command loop.
Add classes, versioned JSON, error handling, a virtual environment, tests, and an optional Rich table display.
Look inside
Try the first setup and concept pages in the free 16-page excerpt. Use the preview selector to see how the milestones are taught.

The PDF and ZIP include every runnable demo, practice and workshop solution, both tracker projects, and a curriculum index. Use Python 3.11 or newer.
Open the Gumroad listing · $20USD base price. Applicable tax is calculated at checkout.