01

Introduction to Python

Write and run your first Python program: print a message on the screen and see how Python reads your code line by line.

02

Variables and types

Store values in variables, name them well, and meet Python's basic types: numbers, strings and booleans, and how to convert from one type to another.

03

Code Helpers

Two tools you will use everywhere: comments to explain your code, and print() to display values and check what your program does.

04

Boolean in Depth

Combine conditions with and, or and not, and compare values with operators like ==, != and >= to get True or False.

05

String in Depth

Work with text: join and repeat strings, measure their length, pick characters by index, cut slices and use the most useful string methods.

06

Conditions

Make your program take decisions with if, else and elif, and run different code depending on the situation.

07

Lists

Create lists, add and remove elements, analyse their content and combine them: the structure you will use most in Python.

08

Tuples

Discover tuples, sequences that cannot be changed, and the methods that let you count and find their elements.

09

Loops

Repeat actions with for and while loops, and control them with break and continue.

10

Sets

Use sets to keep unique values, add and remove elements, and compare collections with union, intersection and difference.

11

Dictionaries

Store data as key–value pairs: create, read, update and remove entries, use dictionary methods and loop over them.

12

Functions

Write your own functions: give them parameters, return values, and understand where variables exist with scope.

13

Errors and Exceptions

Read Python's error messages, catch errors with try and except, and use else and finally to keep your program running.

14

Some intermediate topics

Practical tools for real programs: reading and writing files, enumerate(), input(), split() and join(), list comprehensions, modules, dates, zip(), regular expressions, and lambda functions with map() and filter().

15

Classes and OOP

Model your own objects with classes: methods, inheritance, encapsulation, special methods and composition.

16

What's next?

You have finished the course. See where Python can take you next: websites and APIs, data and automation, and games.

Python course

16 units · 100 chapters · 1056 exercises

This course teaches Python from your very first line of code. You start with print(), variables and types, then learn to make decisions with conditions, repeat work with loops, and organise data in lists, tuples, sets and dictionaries. Functions, errors and exceptions come next, followed by practical tools (reading and writing files, list comprehensions, modules, dates, regular expressions) and object-oriented programming with classes. Most units end with a quiz and one or two challenges where you write the code yourself.