How to run a Python script

0 min

It is fundamental to know how to run a Python script.

To do that you will need a Python script (a file ending up with the .py extension) and a terminal (or console) with Python installed.

Here is the example.py script :

print("Hello world")
How to print a message in the console in Python, e.g. example.py

And the way to run it in the console :

python3 example.py
To run the python script in your console

Here you are ! You now know how to run a Python script.