Skip to content
FollowtheDamnCode

Python from zero

Learn to program from zero with Python — short, readable code that runs as soon as you write it. The language of scripting, automation, data, and machine learning, and the easiest first language to read. The whole course is free.

1Getting Started

What a program is, how Python runs it, and your first lines of output.

2Variables & Types

Storing values — numbers, text, True/False, and None — and reading them from the user.

3Operators

Maths, comparisons, and combining True/False answers.

4Strings

Getting at characters, transforming text, and formatting it beautifully.

5Control Flow

Making decisions and repeating work — if, loops, and match.

6Collections

Holding many values at once — lists, tuples, sets, and dictionaries — and building them in one line.

7Functions

Naming a piece of work once and using it everywhere — parameters, return values, scope, lambdas, and recursion.

8Errors

Reading tracebacks, catching exceptions, and raising your own.

9Files & Modules

Saving data to files, splitting code into modules, and a tour of the standard library.

10Classes & Objects

Bundling data with the code that uses it — classes, inheritance, dunder methods, and dataclasses.

11Pythonic Idioms

The habits that make Python code short and clear — enumerate, zip, unpacking, generators, and decorators.