beginnerGetting Started

Installing Python

How to install Python and set up your development environment.

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 --version
2# 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 + 2
24
3>>> print("Hello from REPL!")
4Hello from REPL!
5>>> exit()