Python Installation
Before you can start writing Python code, you need to install Python on your computer.
Python is available for Windows, Linux, and macOS. You can download the latest version from the official Python website.
Check if Python is Already Installed
Open your command prompt or terminal and run:
python --version
Or:
python3 --version
If Python is installed, you will see the version number.
Example:
Python 3.13.5
Install Python on Windows
- Download Python from the official website.
- Run the installer.
- Select Add Python to PATH.
- Click Install Now.
- Wait for the installation to complete.
Verify the Installation
Open Command Prompt and run:
python --version
You should see the installed Python version.
Run Python
Start the Python interpreter:
python
Example:
>>> print("Hello World")
Hello World
Exit the interpreter:
>>> exit()
Python is now installed and ready to use.