For absolute beginners

Python Foundations Workshop

Write your first script, practice one concept at a time, and build the same Expense Tracker twice as your skills grow.

Python Foundations Workshop cover with terminal windows leading to a ledger
1,000pages
310concept demos
65practice problems
58workshops
2milestone projects

13 chapters

Find a topic

13 chapters

  • 01 Environment and first programs

    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 workshops
  • 02 Variables and data types

    Give 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 workshops
  • 03 Strings and f-strings

    Read 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 workshops
  • 04 Operators, Booleans and conditionals

    Use 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 workshops
  • 05 Collections

    Pick 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 workshops
  • 06 Loops and comprehensions

    Process 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 workshops
  • 07 Functions

    Move 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 workshops
  • 08 Type hints

    Annotate 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 workshops
  • 09 Error handling and debugging

    Reproduce 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 workshops
  • 10 Files, JSON and paths

    Work 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 workshops
  • 11 Standard library essentials

    Use 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 workshops
  • 12 Virtual environments and packaging

    Separate 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 workshops
  • 13 Classes and object-oriented basics

    Give 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 workshops

Build in two milestones

One Expense Tracker, two versions

01 · Build the script

Collect expenses in memory, validate amounts, group by category, and print a total through an interactive command loop.

02 · Build the package

Add classes, versioned JSON, error handling, a virtual environment, tests, and an optional Rich table display.

Look inside

See an actual workbook page

Try the first setup and concept pages in the free 16-page excerpt. Use the preview selector to see how the milestones are taught.

Open the 16-page sample

First runnable demo, page 10

Get the complete workbook

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 · $20

USD base price. Applicable tax is calculated at checkout.