Learning path

Python

A beginner-friendly language used for automation, data and AI.

  1. 1

    Python Introduction

    What Python is, why it's the most popular first programming language, what people build with it, and your first Python program.

    4 min read
  2. 2

    Installing Python

    Install Python 3 on Windows, macOS or Linux, check it works, use the interactive shell, run your first .py file, and set up VS Code for Python.

    5 min read
  3. 3

    Python Syntax

    The basic grammar of Python: statements, indentation and blocks, comments and docstrings, long lines, naming rules and reading error messages.

    4 min read
  4. 4

    Python Variables

    Create variables with assignment, understand that names refer to objects, assign several values at once, swap values, use constants, and print variables with f-strings.

    4 min read
  5. 5

    Python Data Types

    Python's built-in types (int, float, str, bool, None, list, tuple, dict and set), checking types, converting between them, and truthy and falsy values.

    4 min read
  6. 6

    Python Strings

    Create strings, index and slice them, use the essential string methods, format text with f-strings, and loop over characters.

    4 min read
  7. 7

    Python Numbers

    Integers and floats, all arithmetic operators, rounding, the math and random modules, exact money calculations with Decimal, and formatting numbers.

    4 min read
  8. 8

    Python Lists

    Create, index, slice and change lists; add, remove, sort and search items; copy lists safely; and write list comprehensions.

    4 min read
  9. 9

    Python Tuples and Sets

    Use tuples for fixed groups of values and unpacking, and sets for unique items, fast membership tests and set operations like union and intersection.

    4 min read
  10. 10

    Python Dictionaries

    Store key-value data in dictionaries: read safely with get, add, update and delete keys, loop over items, nest data, count things, and use dictionary comprehensions.

    5 min read
  11. 11

    Python If/Else

    Make decisions with if, elif and else, combine conditions with and, or and not, use membership and identity tests, conditional expressions, and match statements.

    5 min read
  12. 12

    Python Loops

    Repeat code with for and while loops, use range, enumerate and zip, control loops with break, continue and else, and avoid common loop bugs.

    4 min read
  13. 13

    Python Functions

    Define functions with def, use parameters, return values, default and keyword arguments, *args and **kwargs, type hints, docstrings, scope and lambda.

    5 min read
  14. 14

    Python Modules

    Import modules, explore the standard library, write your own modules, understand if __name__ == "__main__", and organise code into packages.

    5 min read
  15. 15

    Python Files

    Read and write text files safely with open() and with, process files line by line, append data, work with CSV files, and handle paths with pathlib.

    5 min read
  16. 16

    Python Errors and Exceptions

    Handle errors with try, except, else and finally, catch specific exceptions, raise your own, create custom exception classes, and read tracebacks.

    5 min read
  17. 17

    Python Classes and Objects

    Object-oriented programming in Python: define classes, create objects, use __init__, attributes and methods, class attributes, special methods, properties, inheritance and dataclasses.

    6 min read
  18. 18

    Python pip and Packages

    Install third-party packages from PyPI with pip, isolate projects with virtual environments, record dependencies in requirements.txt, and choose packages safely.

    4 min read
  19. 19

    Python JSON and APIs

    Convert between Python and JSON, save and load JSON files, call web APIs with urllib and requests, send data with POST, handle errors and keep API keys secret.

    5 min read
  20. 20

    Python Project: Simple Expense Tracker

    Build a command-line expense tracker step by step with a dataclass, functions, JSON storage, error handling, reports by category and month, and CSV export.

    6 min read