Advertisement
❮ Previous: Python Home Next: Python Get Started & VirtualEnv ❯

Python Intro & Installation

Python is a high-level, interpreted, general-purpose programming language created by Guido van Rossum and first released in 1991. It emphasizes code readability and clean syntax, enabling developers to write logical code for small- and large-scale projects.


Why Learn Python?


Step-by-Step Installation Guide

  1. Download the Installer: Official Release Source.
    Navigate to the official website at python.org/downloads and download the latest stable release for your operating system (Windows, macOS, or Linux).

  2. Run Installation (Critical PATH Step): Windows Prerequisite.
    Launch the downloaded installer. On Windows, ensure you check the box that says "Add python.exe to PATH" before clicking Install Now. Checking this box enables running Python directly from any terminal prompt.

  3. Verify the Installation: Terminal Check.
    Open your terminal (Command Prompt/PowerShell on Windows, or Terminal on macOS/Linux) and verify Python is active by checking its version:

python --version
# or on macOS/Linux systems:
python3 --version

  1. Run Your First Python Code: Interactive REPL or Script.
    Option 1: Interactive REPL

Type python or python3 in your terminal to start the interactive interpreter, then execute:

print("Hello, World!")

Try this code ❯

Exit using exit() or Ctrl+Z (Windows) / Ctrl+D (macOS/Linux).

Option 2: Script File

Create a file named hello.py with your editor containing print("Hello, World!") and run it:

python hello.py

❮ Previous: Python Home Next: Python Get Started & VirtualEnv ❯
Advertisement