Course: Learn to code from scratch with Python
Complete Python course from scratch to professional level: static typing with mypy, testing with pytest, and best practices from day one.
1 Introduction to Programming
What is programming? In this first lesson, we'll discover what it means to code, how programming languages work, and why Python is the ideal language to start with.
2 Setting Up Python Environment
Learn how to install Python with asdf, configure VS Code, and run your first program. Everything you need to start programming from scratch.
2.5 Python REPL: Your Interactive Python Playground
Discover the Python REPL (Read-Eval-Print Loop), a powerful tool for testing code, learning Python interactively, and experimenting with ideas instantly.
3 Variables and data types in Python
Learn how to create variables, understand Python's basic data types (numbers, strings, booleans), and how to use them to build your first programs.
4 Operators and expressions in Python
With variables under control, it's time to do something useful with them. In this tutorial you'll learn how to operate on data in Python: math, comparisons, logic... and how not to mix up = with ==.
5 Strings and string methods in Python
Strings are the data you'll work with most in Python. In this tutorial you'll learn how to create them, manipulate them, and get the most out of Python's string methods.
5.5 Common beginner mistakes in Python (and how to fix them)
Python's error messages are your best ally — if you know how to read them. Learn to decode tracebacks, understand the most common beginner mistakes, and build a debugging mindset from day one.
6 Conditional statements in Python: if, elif, and else
Your code has always executed the same instructions in the same order. With if, elif, and else, it can finally make decisions. Learn to write programs that react to data.
7 while loops in Python: repetition with a condition
You already know how to make decisions with if. Now learn how to repeat them. while loops execute code over and over as long as a condition holds — and yes, infinite loops are very real.
8 for loops and range() in Python: iterate without the busywork
while gives you control. for gives you clarity. Learn to iterate over sequences, generate number ranges with range(), and write nested loops — without managing a counter by hand.