Lesson 1
10 min
Understand what Python is, what it's used for and why it's an excellent first language.
Definition
Python is an interpreted and versatile programming language: it lets you write readable instructions that the computer executes to automate tasks, analyze data or build websites and applications. Unlike compiled languages, the code is not transformed in advance: a program called an interpreter reads it and executes it line by line. A Python file is launched withpython my_file.py.
Python is a programming language created in 1991 by Guido van Rossum, a Dutch computer scientist. It is known for its clear syntax, close to English, which makes it one of the best languages for beginners. Yet it is powerful enough to be used at companies like Google, Netflix or Instagram.
The name of the language does not come from the snake, but from the British comedy troupe Monty Python , of which Guido van Rossum was a fan. That is also why the official documentation often contains humorous references and why the Python community has a reputation for being welcoming.
A programming language is used to give precise instructions to a computer. Python is an interpreted language: you write your code in a file, and a program called the interpreter reads it and executes it line by line, with no prior compilation step.
A Python program is simply a text file whose name ends with.py. When you run this file, the interpreter reads each line from top to bottom, translates it into instructions your machine can understand, then executes it immediately. If it encounters an error, it stops and displays a message that indicates the line concerned.

By contrast, languages like C or Rust are called compiled : the code must first be transformed into an executable file before being run. This step often makes the program faster, but development takes a little longer. Python favors simplicity and speed of writing.
Here is what the simplest possible program looks like. It displays a message on the screen using theprint() function:
print("Hello, world!")Python is a general-purpose language: it can be used in almost every area of computing. Here are the most common uses.

Python is one of the most popular languages in the world. Google uses it for some of its services, Netflix for its analysis and recommendation tools, Instagram for its infrastructure, and NASA for scientific calculations. Thousands of developers, researchers and analysts use it every day, which guarantees a huge community, plenty of tutorials and thousands of free libraries.
No language is perfect. Here is what makes Python strong, but also what you should know before diving in.
Python 2 has not been maintained since 2020. In this course, we use exclusively Python 3 , the current version of the language. If you see a tutorial that usesprint "hello"without parentheses, it is Python 2: do not use it. In Python 3, you always writeprint("hello").
Good to know
Python is not a "kids' language": its simplicity is a design choice. The same concepts you will learn here (variables, conditions, loops, functions) are found in all other languages. Once you have mastered Python, learning JavaScript, Java or C becomes much easier.
You will install Python, write your first program, work with variables and data types, make decisions with conditions, repeat actions with loops, organize your code with functions, then discover lists, dictionaries, modules and error handling.
Each lesson follows the same logic: a short explanation, examples you can copy and test, then an exercise to practice. The most important thing is to practice : type the code yourself rather than just reading it, and do not be afraid of error messages. They are part of learning and help you understand what is going on.
Exercise