Skip to content
UPEEC

Getting Started with Python

Install Python, run code in the interactive shell or as a script, and learn why indentation matters.

Beginner
Comments 0
  1. Install Python 3 from python.org (tick "Add to PATH" on Windows).
  2. Run python (or python3) for the interactive REPL, great for quick experiments.
  3. Save code in hello.py and run python hello.py.
name = input("Your name: ")
print(f"Hello, {name}!")

Python uses indentation (4 spaces by convention) instead of braces to group statements — inconsistent indentation is a syntax error. Comments start with #.

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.