
Learning to program in Python starts here, from zero, and for free. This page introduces the site's Python course: where to start, in what order to progress, and where to find each topic among more than a hundred guides. It is aimed at the complete beginner as well as at the administrator who wants to automate daily work. The first lesson, first steps in Python, installs Python and teaches the first program, variables, types and basic operations.
Python is a general-purpose language and one of the most accessible for beginners: its readable syntax makes it an excellent first language, and it requires no maths background. Once the basics are in place, the topic map below leads to data structures, object-oriented programming, DevOps automation and even artificial intelligence.
Where do you start to learn Python?
Learning Python effectively follows a progression: you first absorb the syntax and basic types, then structure your code, and finally organise it into reusable projects. The fundamentals path follows this order, one lesson after another: the course outline shown on the left places you at each step, and the page Python, the fundamentals tracks your progress.
Everything starts with first steps in Python: install Python, write and run a first script, create variables, learn the four basic types and read an error message. Allow half an hour, examples included.
Next come control structures and collections: conditions, loops, lists and dictionaries to write programs that react to data. Then, writing functions lets you split your code into reusable blocks (parameters, return values, variable scope), and handling exceptions teaches you to anticipate errors for robust scripts that do not crash at the first surprise.
The guide on reading and writing files (text, CSV and JSON) is the base of almost every useful script. Modules and packages then organise code into reusable modules and structure a project. Finally, virtual environments isolate each project's dependencies to avoid version conflicts.
History of the Python language
Python was created in 1989 by Guido van Rossum, with the idea of designing a simple and flexible language, inspired by ABC. In 1991, the first public version, Python (0.9.0), appeared, introducing concepts such as functions, classes and modules, which became pillars of the language. Three years later, in 1994, Python 1.0 was released, with key features such as exception handling and more robust modules.
In 2000, Python 2.0 was launched, bringing innovations such as automatic memory management and list comprehensions, which improved the flexibility and readability of code. Then, in 2008, Python 3.0 was introduced, with deep but non-backward-compatible improvements, marking a new era for the language.
The full transition to Python 3 took time, but in January 2020, Python 2.7 reached its end of life, making Python 3 the standard version. Since Python 3.9, a new version comes out every year in October: 3.14 in October 2025, then 3.15 in October 2026, each with better performance and new features.
Today, Python is widely used in varied fields such as web development, artificial intelligence and data science, thanks to its simplicity and a very active community. This popularity comes down to a few traits: a readable syntax, dynamic typing, a huge standard library and an ecosystem of third-party packages covering almost every need.
Why is Python a good first language?
Python is a good first language because it removes almost everything that
distracts a beginner from the logic of the program. Its syntax reads
almost like English, and blocks are delimited by indentation rather than
braces, which forces you to write airy code. Variables are created without
declaring their type: age = 30 is enough, and Python infers an integer.
Finally, the interactive interpreter answers every instruction you type,
which turns each doubt into a few seconds of trial rather than a read through
the documentation.
This comfort has a downside worth knowing from the start: dynamic typing lets through errors that other languages refuse at compile time, and they only appear at run time. That is why the course teaches early how to read error messages, then exceptions, tests and type annotations. Abundant official documentation, published on the Python website, and a very active community complete the picture.
Everything this Python course covers
This site has more than a hundred Python guides. So you do not get lost, here they are grouped by theme. The fundamentals (variables, loops, functions, files, modules) are listed above in the section "Where do you start". The map below covers what comes next: data handling, code structure, tooling, automation and artificial intelligence. Pick according to your need, each guide stands alone.
Handling data
After the basic types, you learn to structure and transform data. These guides cover collections and text, the daily bread of every Python script.
For collections, see lists (create, iterate, sort and filter with append, index and sorting), dictionaries that map keys to values, the most used structure in Python, sets of unique elements to deduplicate and compare without a loop, and tuples, immutable collections. Slicing cuts lists, strings and tuples with the slice notation.
For text, string methods split, join, clean and replace (split, join, strip), string formatting builds text cleanly with f-strings and format(), and regular expressions search and extract patterns with the re module.
Structuring your code: objects and patterns
When a script grows, you organise it into objects and factor it. These guides take you from a linear script to reusable, maintainable code.
Object-oriented programming lays the foundations: classes, objects, attributes and methods. Advanced OOP adds dataclass, abstract classes, multiple inheritance, mixins and metaclasses. Decorators enrich a function without modifying it, with the @ syntax and wraps, and generators and yield produce values on the fly to process large volumes without saturating memory.
Type hints annotate and check code with mypy to catch bugs earlier. Asynchronous programming (asyncio) uses async and await to launch hundreds of network calls at once, and context managers (with) cleanly manage and release files, locks and connections.
Tooling and making your projects reliable
A serious project isolates its dependencies, checks its quality and is tested. These are the tools you will use on every real project.
On the dependencies side, virtual environments isolate each project. uv is the ultra-fast manager that replaces pip and Poetry, with a lockfile; Poetry manages dependencies and packages a library cleanly; pyenv installs and switches between several Python versions on a machine.
On the quality side, Ruff is an ultra-fast linter and formatter to keep code consistent, and testing your code teaches you to write reliable tests with unittest and pytest so you break nothing. To share, publishing on PyPI packages a module as sdist and wheel, then publishes it with twine.
Automating and scripting for DevOps
This is where Python becomes an infrastructure tool: calling APIs, reading configurations, building command-line tools, logging.
To talk to the outside world, calling an API with requests consumes a REST API (GET, POST, error handling and TLS). Click turns a script into a clean, documented command-line tool, and Rich makes output readable with tables, colours and progress bars.
For files and data, Jinja2 templates generate configuration files from models, and PyYAML reads and writes YAML safely. The logging module produces usable logs instead of scattered print() calls, datetime timestamps, computes deadlines and handles time zones, and pathlib composes, tests and walks files and folders with the Path class.
Web, APIs and databases
To move toward complete applications, Python can expose APIs and talk to a database through an ORM.
Web and databases. FastAPI creates a fast, typed, automatically documented REST API. SQLAlchemy handles a database with Python objects rather than raw SQL. Two guides complete the infrastructure side: Fabric runs remote commands and deploys over SSH from Python, and Nmap drives the scanner to check ports and hosts.
Python for artificial intelligence
Python is the language of AI. Once the basics are in place, a full path takes you from the local LLM to RAG and agents. These four entry points each open a whole section.
The generative AI course is the complete hub: LLM, RAG, agents and MCP, from concept to practice. To begin, Ollama runs language models on your machine, with no cloud; the RAG guide plugs a model into your own data for reliable answers; and building AI agents leads autonomous agents up to the MCP protocol.
If you are aiming more at data analysis or machine learning, install Jupyter Notebook, an interactive environment that eases experimentation and data visualisation.
My advice to really progress
After years of training teams, I keep seeing the same two pitfalls in beginners, and they have nothing to do with the difficulty of the language.
The first: chaining tutorials without ever coding yourself. You read, you nod, you think you understood, and in front of an empty terminal nothing comes. The only method that works is to write code for every notion, even clumsy. Take each example from the lessons, break it, change it, watch the error. You learn by repairing.
The second: neglecting error handling and the virtual environment on the grounds that "it works anyway". Get into the habit right away of isolating each project in a virtual environment and of writing scripts that do not crash at the first surprise. These two habits, taken from the start, will save you hours of trouble later.
If you also prefer to learn on paper, two books in French cover these basics step by step, with exercises:
Key takeaways
- Python is learned from zero, with no maths prerequisite: the first lesson, first steps in Python, starts from the installation.
- Install Python 3.10 or newer; on Linux, the command to type is often
python3, notpython. - Progress in order: syntax and types, then conditions and loops, functions, exceptions, files and modules.
- Write code for every notion: you learn by fixing your mistakes, not by rereading.
- Isolate each project in a virtual environment from the start.
FAQ: learning Python
The questions below come up most often for people who are starting out: how long it takes to learn, which version to install, how much maths is needed. Each answer fits in a few lines.
- Install Python and write a first
hello.pyscript. - Learn variables and the basic types (int, str, float, bool). The lesson first steps in Python covers these two steps.
- Move on to control structures (conditions, loops) and collections (lists, dictionaries).
- Learn to write functions to reuse your code.
- Add exception handling, reading files, then modules.
- Writing simple scripts (variables, loops, functions): 2 to 3 weeks of regular practice.
- Being autonomous on real small projects (files, APIs, automation): 2 to 3 months.
- Mastering advanced topics (OOP, packaging, tests, async): several months of real use.
- Readable syntax: indentation replaces braces, the code reads almost like English.
- Dynamic typing: no need to declare variable types, you focus on the logic.
- Interactive interpreter: you test an idea and see the result immediately.
- Versatility: once the basics are learned, the same language serves web, DevOps automation, data and artificial intelligence.
- Never install Python 2: it has been end of life since January 2020, with no security fixes.
- On Linux,
python3is often already installed; check withpython3 --version. The lesson first steps in Python details installation on each system. - To juggle several versions (one project on 3.11, another on 3.13), use pyenv rather than installing the versions by hand.
- data science and statistics,
- machine learning and artificial intelligence.
- a computer (Linux, Windows or macOS),
- Python installed (the lesson first steps in Python shows how, on Linux, macOS and Windows),
- a free text editor such as Visual Studio Code.
# first_program.py
name = input("What is your first name? ")
print(f"Hello {name}, you are programming in Python!")
Run it with python3 first_program.py (on Windows, py first_program.py). From there, you are programming in Python: add a condition, then a loop, then a function, testing each addition. It is by accumulating these small programs that you really learn to program, far more than by passively following a course.- its syntax is readable, close to everyday English (
if age > 18:reads almost like a sentence); - it requires no background in computing or maths to start;
- the feedback is immediate: you write three lines, run them, see the result.