beginnerGetting Started
Installing Python
How to install Python and set up your development environment.
In this lesson
01Download Python
Visit python.org and download the latest version of Python for your operating system (Windows, macOS, or Linux). Make sure to check "Add Python to PATH" during installation on Windows.
02Verify Installation
Open your terminal or command prompt and run the following command to verify Python is installed correctly:
Python
1python --version2# Output: Python 3.12.x
03Your First Python Program
Create a file called hello.py and write the following code:
Python
1print("Hello, World!")
Output
Hello, World!
04Using the Python REPL
You can also run Python interactively using the REPL (Read-Eval-Print Loop). Just type python in your terminal:
Python
1>>> 2 + 2243>>> print("Hello from REPL!")4Hello from REPL!5>>> exit()