Quick answer: This is a free, step-by-step Python course in 63 short lessons, in a fixed order. Each lesson teaches one topic with code you can run, the real output, exercises with solutions, and the mistakes beginners usually make. Start with Lesson 1 and follow the “Next lesson” link at the end of each page.
The course goes from installing Python to testing, APIs and two capstone projects. It teaches Python 3 as it is used today, including modern project setup with virtual environments and pyproject.toml. New lessons are added in order; 30 of 63 are live now, and lessons that are not published yet are listed without a link.
Table of Contents
Who this Python course is for
- Complete beginners who have never programmed.
- Students and analysts who want Python for data science, data engineering or AI work.
- People who know a little Python but learned it in pieces and want the gaps filled in order.
You need a computer (Windows, macOS or Linux) and about 30 to 60 minutes per lesson. No paid software is needed.
How to use this course
- Read the lessons in order. Each one names what you should know before you start.
- Type the code yourself instead of copying it, then compare your output with the output shown.
- Do the “Try it yourself” exercises before you look at the solutions.
- Finish each level with its practice set or project before you move on.
Python course outline
Level 1: Foundations
Module 1: Getting started
- Lesson 1: What Python is and what it is used for
- Lesson 2: Install Python on Windows, macOS and Linux
- Lesson 3: Run your first program: REPL, scripts and VS Code
- Lesson 4: Python syntax, indentation and comments
Module 2: Values
- Lesson 5: Variables and naming rules
- Lesson 6: Numbers: int, float, decimal
- Lesson 7: Strings and f-strings
- Lesson 8: Booleans, None and type conversion
- Lesson 9: Operators and precedence
- Lesson 10: Input and output
Module 3: Control flow
- Lesson 11: if, elif, else and match
- Lesson 12: for loops and range()
- Lesson 13: while loops, break and continue
- Lesson 14: Level 1 practice set + mini project (number guessing game)
Level 2: Core
Module 4: Data structures
- Lesson 15: Python Lists and List Methods: Indexing, Slicing, Sorting and Copying
- Lesson 16: Python Tuples and Unpacking: One-Item Tuples, Star Unpacking and Swapping
- Lesson 17: Python Dictionary: Keys, Values, get() and Looping with items()
- Lesson 18: Python Sets: add(), discard(), Union, Intersection and Removing Duplicates
- Lesson 19: Python List vs Tuple vs Set vs Dict: Which One to Use
- Lesson 20: Python String Methods and Slicing: split(), join(), strip() and Reversing Strings
- Lesson 21: Python List, Dict and Set Comprehensions with if, else and Nested Loops
Module 5: Functions
- Lesson 22: Python Functions: def, return, Parameters and Docstrings
- Lesson 23: Python Function Arguments: Defaults, Keyword Arguments, *args and **kwargs
- Lesson 24: Python Variable Scope: LEGB, global and nonlocal
- Lesson 25: Python Lambda Functions: sorted() with key, map() and filter()
- Lesson 26: Python Recursion: Base Case, Call Stack and RecursionError
Module 6: Modules and environments
- Lesson 27: Python Modules: import and the Standard Library
- Lesson 28: Write Your Own Python Modules and Packages: __init__.py and if __name__ == “__main__”
- Lesson 29: Install packages with pip (coming soon)
- Lesson 30: Virtual environments with venv (coming soon)
- Lesson 31: pyproject.toml and uv vs pip vs Poetry (coming soon)
Level 3: Intermediate
Module 7: Files and errors
- Lesson 32: Read and write text files (with, encoding) (coming soon)
- Lesson 33: Work with paths using pathlib (coming soon)
- Lesson 34: CSV and JSON files (coming soon)
- Lesson 35: Exceptions: try, except, else, finally (coming soon)
- Lesson 36: Raising and custom exceptions (coming soon)
- Lesson 37: Debugging with breakpoint()/pdb and the logging module (coming soon)
Module 8: OOP in Python
- Lesson 38: Classes and objects (coming soon)
- Lesson 39: Instance, class and static methods; @property (coming soon)
- Lesson 40: Inheritance and super() (coming soon)
- Lesson 41: Dunder (magic) methods (coming soon)
- Lesson 42: dataclasses (coming soon)
- Lesson 43: Composition, ABCs and Protocols: designing classes (coming soon)
Level 4: Advanced
Module 9: Advanced Python
- Lesson 44: Iterators and the iteration protocol (coming soon)
- Lesson 45: Generators and yield (coming soon)
- Lesson 46: Closures and decorators (coming soon)
- Lesson 47: Context managers (with, contextlib) (coming soon)
- Lesson 48: Type hints and static checking (mypy/pyright) (coming soon)
- Lesson 49: Threads vs processes vs asyncio (coming soon)
- Lesson 50: asyncio basics: async, await, tasks (coming soon)
- Lesson 51: Measure and speed up Python code (timeit, cProfile) (coming soon)
Module 10: Testing
- Lesson 52: Testing with pytest: your first tests (coming soon)
- Lesson 53: pytest fixtures, parametrize and mocking (coming soon)
- Lesson 54: Formatting and linting (Ruff) + pre-commit (coming soon)
Level 5: Projects and real-world Python
Module 11: APIs
- Lesson 55: Call web APIs with requests (coming soon)
- Lesson 56: Build your first API with FastAPI (coming soon)
- Lesson 57: Configuration and secrets: environment variables and .env (coming soon)
Module 12: Projects
- Lesson 58: Python projects for beginners (coming soon)
- Lesson 59: Python projects for intermediate developers (coming soon)
- Lesson 60: Capstone: a packaged command-line tool with tests (coming soon)
- Lesson 61: Capstone: REST API with FastAPI, SQLite and pytest (coming soon)
Module 13: Next steps
- Lesson 62: Python for data science: what to learn next
- Lesson 63: Python libraries for large-scale data processing
Frequently asked questions
Is this Python course free?
Yes. Every lesson is free to read on this site, and all the tools used in the course (Python, VS Code, pip, venv, pytest) are free and open source.
How long does it take to finish the Python course?
There are 63 lessons, and most take 30 to 60 minutes with the exercises. At one lesson a day you would finish the core levels (1 to 3) in about six weeks, but the speed is up to you.
Do I need to know math to learn Python?
No. The course uses only basic arithmetic. Statistics and other math come later, in the Data Science and Machine Learning courses, when you need them.
What should I learn after Python?
That depends on your goal. For data work, continue with SQL and then Data Science. For AI, continue with Machine Learning. The last module of this course points to the right next step.
Start the course
Begin with Lesson 1: What Python is and what it is used for.





