PyPython

Learn Python – all lessons

12 lessons from beginner to advanced, building on each other and with code examples.

Beginner
1

Hello World & print

Your first program and how output works.

2

Variables & Data Types

Numbers, text, Booleans and how Python handles types.

3

Conditions: if, elif, else

Making decisions in code.

4

Loops: for & while

Repeating tasks – over numbers, lists and more.

5

Functions

Reusable building blocks of code with parameters and return values.

6

Lists, Tuples, Dictionaries, Sets

The four most important collection types.

Intermediate
7

Strings & Files

Processing text, reading and writing files.

8

Error Handling

try/except, custom errors and cleaning up with finally.

9

Classes & Object-Oriented Programming

Custom data types with data and behavior.

10

Modules, Packages & pip

Using the standard library and installing packages.

Advanced
11

Generators, Iterators & Decorators

Memory-efficient data streams and functions that extend functions.

12

Type Hints & asyncio

Static type checking and concurrent I/O.