datarekha

Getting Started with Python

Skip the install. Run your first Python program right here, in your browser, in 10 seconds.

⏱ 5 min read Beginner Python Updated May 2026

What you'll learn

  • How to run Python without installing anything (yes, really)
  • The right way to install it locally for real projects
  • When to use the REPL, a script, and a Jupyter notebook

Most Python tutorials open with “first, install Python.” That’s the wrong first step. Let’s run some Python first — right now, in this page — and worry about installation when you actually need it.

Run your first Python program

Click ▶ Run below. The first run downloads Python-in-the-browser (~10 MB, one-time per visit), then your code executes locally on your machine — never on a server.

Python
Ready
Output
(click Run)

Did it work? You just ran Python.

The f"..." syntax is an f-string — a literal where any {expression} gets evaluated and inserted. You’ll use these in basically every program you write.

A program that does something useful

Counting words is the “hello world” of text processing. Try it:

Python
Ready
Output
(click Run)

Counter is part of the standard library — Python ships with hundreds of useful classes like this. Reach for the standard library before installing anything.

OK, now let’s actually install Python

For real work, you want Python on your machine. The Python ecosystem has the worst installation story in tech, so let’s get it right.

You almost never want to use the Python that ships with macOS or Linux — it’s the system Python and modifying it can break OS tools. Use one of these:

  • macOS / Linux: install uvcurl -LsSf https://astral.sh/uv/install.sh | sh
  • Windows: download the installer from python.org, or winget install Python.Python.3.12

Then verify:

python --version
# Python 3.12.x

Virtual environments — the one habit you can’t skip

A virtual environment is an isolated Python install per project. It prevents the dependencies of project A from breaking project B.

With uv:

mkdir hello && cd hello
uv init                 # creates pyproject.toml + .venv
uv add pandas numpy     # installs into .venv
uv run main.py          # runs main.py using the venv

REPL, script, or notebook?

Three places you’ll run Python. Pick the right one for the job:

ToolWhen to use it
REPL (run python in your terminal)Quick experiments, exploring a library’s API
Script (.py file)Anything you’ll re-run, share, or deploy
Jupyter notebook (.ipynb)Data exploration, model training, sharing results

A common mistake is using notebooks for everything. They’re great for exploration but a nightmare for version control. Once your code is “real”, move it to .py files.

Quick check

Quick check

0/3 answered
Q1.Which command creates a new Python project with uv?
Q2.What does an f-string do?
Q3.Which of these are good reasons to use a virtual environment?(select all that apply)

What’s next

You ran Python. You know how to install it. Time to learn the language itself — starting with syntax, variables, and the types you’ll use every day.

Finished the lesson?

Mark it complete to track your progress and keep your streak alive. +20 XP

Skip to content