Skip to content

Python

Verified 21 Sept 2026

This is a complete course in Python, taught from zero as the first programming language you learn properly. It teaches the Python language to the depth a professional Python engineer needs in any area: backend, data, AI and automation. Each concept is first explained as a general question that every programming language must answer, and then as Python’s answer. That way, what you learn here carries over to the next language.

The course also teaches the tools you need to work without help: the terminal, installing Python, an editor, virtual environments and automated tests.

One project runs through the whole course: a command-line expense tracker that you build from an empty folder and keep.

What this course does not cover. Libraries and frameworks built on Python, such as Django, FastAPI, pandas and PyTorch, are separate courses after this one. The same is true of web development and HTTP, databases and SQL, algorithms and data structures as a subject, publishing packages, and git.

The goal. By the end, without AI help and with only the official documentation at docs.python.org open, you will be able to:

  • build the expense tracker from an empty folder, with several files, functions and classes, JSON and CSV files, deliberate error handling, its own virtual environment and passing automated tests;
  • read 50–100 lines of unfamiliar Python, explain every line, and predict the output before running it;
  • take a broken program and its error report, and find and fix the cause within 30 minutes;
  • open the first tutorial page of four widely used Python libraries (one each from web backend, data processing, AI and automation) and explain every Python language feature on it;
  • learn a standard-library module you have never used from its documentation, and use it correctly within 45 minutes.

Version. The course is checked against Python 3.14.7 (checked on 2026-09-21). Python 3.15 is due on 2026-10-01. The course stays on 3.14, because version 3.15 changes little that a beginner meets, and new releases are safer to adopt after a few months.

Size. 45 modules in 11 parts. The estimated total is about 113 hours, which is an estimate for planning, not a limit. The full outline, with every section and topic, is on the syllabus page.

Nothing transfers in. learner-profile.md records no language you already know, so every module teaches from zero. The ideas that will transfer out to your next language are the general questions each module starts from: how names refer to values, how errors travel, how code is split into modules, how iteration works, and how a program does several things at once.

Install Python, run code in the interactive interpreter and from script files, and move around the file system from a terminal.

1 of 3 written · 545 min

2. Installing Python and an editor

Install Python 3.14, confirm which version runs, and open a project in an editor.

build · 115 min

Python 3.14 installed, python –version printing 3.14.x, and Visual Studio Code opening the tracker folder

stub

3. Using the Python interpreter

Run Python code interactively and from files, pass arguments to a script, and ask Python itself for help.

build · 170 min

a script run three ways (as a file, with -m, and inspected with -i) that prints the arguments it received

stub

Write short programs that read input, calculate with numbers and text, make decisions, repeat work and organise code into functions.

0 of 7 written · 1645 min

4. Basic syntax

Write and run small programs, read the error report when one fails, and fix syntax errors on your own.

build · 260 min

a greeting script that reads a name, with every syntax error it can produce reproduced and fixed

stub

5. Variables and data types

Store values in variables and choose and convert between numbers, booleans and None.

build · 340 min

a unit-converter script that reads numbers, converts between types and prints rounded results

stub

6. Strings

Create, slice, search and format text, and print aligned, rounded output.

build · 275 min

a receipt-printing script that formats names and amounts into aligned columns

stub

7. Operators and expressions

Predict the result of comparison, boolean, membership and identity expressions before running them.

build · 180 min

a set of expressions whose results were predicted in writing, then checked by running them

stub

8. Conditional statements: if, elif and else

Make a program choose between several paths depending on its input.

build · 120 min

a script that classifies an expense amount into bands and rejects invalid input

stub

9. Loops: for and while

Repeat work with for and while loops, and stop a loop early or skip an item.

build · 160 min

a number-guessing game with a limited number of attempts and input validation

stub

10. Functions

Define functions with parameters and return values, and predict which variable a name refers to.

build · 310 min

a module of small functions that calculate totals, averages and category shares for the tracker

stub

Store and process collections of data with lists, tuples, dictionaries and sets, and predict when a change through one name appears through another.

0 of 7 written · 920 min

11. Lists

Build, change, sort and summarise lists of values.

build · 230 min

an in-memory list of expenses that can be added to, removed from, sorted and summarised

stub

12. Tuples and sequences

Group values into tuples and unpack them into separate names.

build · 90 min

functions that return several values as a tuple, called with unpacking

stub

13. Dictionaries

Map keys to values, look them up safely and count or group data with the collections module.

build · 145 min

a category-to-total summary of the tracker’s expenses

stub

14. Sets

Remove duplicates and compare collections with set operations.

build · 90 min

a script that finds categories present in one expense file but not another

stub

15. Object references and mutability

Predict when changing an object through one name shows up through another, and copy data safely.

diagnosis · 115 min

five aliasing bugs reproduced, predicted in writing and fixed

stub

16. Comprehensions

Build lists, sets and dictionaries from other collections in one readable expression.

build · 105 min

the tracker’s summary loops rewritten as comprehensions where that is clearer

stub

17. Looping techniques

Loop over indexes, pairs and dictionaries cleanly, and change a collection safely while processing it.

build · 145 min

the tracker’s report loops using enumerate(), zip() and items()

stub

Split a program into modules and packages, read and write text, JSON and CSV files, and handle errors deliberately.

0 of 5 written · 850 min

18. Modules and packages

Split a program into modules and packages and control what Python finds when it imports.

build · 210 min

the tracker split into several modules inside a package and run with python -m

stub

19. Reading and writing files

Read and write text files safely, choose the right encoding and handle missing files.

build · 180 min

the tracker saving its expenses to a text file and loading them again

stub

20. JSON and CSV files

Load and save structured data as JSON and CSV.

build · 105 min

the tracker importing a CSV of expenses and exporting a JSON summary

stub

21. Errors and exceptions

Handle expected errors deliberately, raise your own, and let unexpected ones surface with a useful traceback.

diagnosis · 230 min

the tracker rejecting bad CSV rows with clear messages instead of crashing

stub

22. File and directory access

Build file paths, list and search folders, and copy or move files from Python.

build · 125 min

the tracker finding every CSV file in a folder and moving processed files into an archive folder

stub

Model data and behaviour with classes, reuse code through inheritance and composition, and make objects work with Python’s built-in syntax.

0 of 6 written · 765 min

23. Classes and objects

Define classes with attributes and methods, and create and use instances of them.

build · 200 min

an Expense class and an ExpenseBook class used by the tracker

stub

24. Inheritance

Share behaviour between classes with inheritance, and choose composition when it fits better.

build · 130 min

expense types that share behaviour through a base class, and the same design rewritten with composition

stub

25. Special methods

Make your objects print, compare, add and behave like containers by writing special methods.

build · 165 min

a Money class that prints, compares, adds and sorts correctly

stub

26. Data classes

Replace hand-written data-holding classes with dataclasses.

build · 90 min

the Expense class rewritten as a dataclass

stub

27. Enumerations

Represent a fixed set of named values with enum.

build · 75 min

an expense-category enum used to validate input

stub

28. The match statement

Choose between cases by matching the shape of data with match and case.

build · 105 min

a command dispatcher for the tracker’s command-line interface written with match

stub

Use iterators, generators, decorators, context managers, functional tools and type hints, and recognise them in any library’s code.

0 of 5 written · 650 min

29. Iterators and generators

Write generators that produce values lazily, and explain what a for loop does behind the scenes.

build · 160 min

a generator pipeline that streams a large CSV file in constant memory

stub

30. Decorators

Pass functions as values, write closures, and write and read decorators.

build · 160 min

a @timed and a @retry decorator applied to tracker functions

stub

31. Context managers

Use and write context managers that guarantee clean-up code runs.

build · 105 min

a timing context manager and a temporary-directory helper for the tracker’s tests

stub

32. Functional programming

Transform data with map, filter, functools and operator instead of hand-written loops.

build · 95 min

the tracker’s report calculations rewritten with map(), filter(), sort keys and functools.reduce

stub

33. Type hints

Annotate code with type hints, check it with a type checker, and read the hints in library code.

build · 130 min

the tracker fully annotated and passing a type checker

stub

Run work concurrently with threads, processes and asyncio, and explain which one fits a task.

0 of 2 written · 315 min

34. Threading and multiprocessing

Run I/O-bound work in threads and CPU-bound work in processes, and explain what the global interpreter lock changes.

build · 150 min

a script that downloads nothing but simulates slow I/O in a thread pool and heavy calculation in a process pool, with timings

stub

35. Asynchronous programming with asyncio

Write async functions, run several of them concurrently, and avoid calls that block the event loop.

build · 165 min

an async script that runs several simulated slow tasks concurrently with a limit on how many run at once

stub

Use standard-library modules for dates, text patterns, command-line interfaces and logging, and learn an unfamiliar module from its documentation.

0 of 5 written · 545 min

36. Dates and times

Parse, compare, format and do arithmetic with dates and times.

build · 95 min

the tracker grouping expenses by month with correctly parsed dates

stub

37. Regular expressions

Search, validate and extract text with regular expressions.

build · 105 min

a validator for expense descriptions and an extractor for dates in free text

stub

38. Command-line interfaces: sys.argv and argparse

Build a command-line interface with options and help text, and exit with the right status.

build · 105 min

the tracker’s command-line interface with subcommands and generated –help

stub

39. Logging

Record what a program does at the right level, to the console or a file.

build · 105 min

the tracker logging skipped rows to a file with levels

stub

40. Brief tour of the standard library

Find a standard-library module for a task and learn to use it from its documentation page alone.

build · 135 min

a small script built with a standard-library module you had never used, working only from its documentation page

stub

Work in a virtual environment, install third-party packages, and keep code consistently formatted.

0 of 2 written · 230 min

41. Virtual environments and packages

Create a virtual environment, install and pin third-party packages, and describe a project’s dependencies.

build · 150 min

the tracker in its own virtual environment with a pinned third-party dependency

stub

42. Code style and formatting

Write code that follows PEP 8 and keep it formatted and linted automatically.

build · 80 min

the tracker formatted and linted with no warnings

stub

Find the cause of a bug methodically with a debugger, and prove code works with automated tests.

0 of 2 written · 250 min

43. Debugging

Find the cause of a bug methodically, using tracebacks, print statements and the debugger.

diagnosis · 140 min

three broken versions of the tracker, each diagnosed and fixed with the debugger

stub

44. Testing

Write and run automated tests that check functions, including the errors they should raise.

build · 110 min

a test suite for the tracker’s parsing and summary functions that runs green

stub

Plan, structure, test and finish a multi-module program on your own.

0 of 1 written · 105 min

45. Developing a larger application

Plan and build a complete multi-module program from an empty folder.

build · 105 min

the finished expense tracker: several modules, classes, JSON and CSV files, error handling, a virtual environment and passing tests

stub