Level 0 · Base Camp

Why Python? An Honest Accounting ⚖️

Every language brochure claims the same six virtues. This lesson gives you the real ones, with sources, and then tells you where Python loses.

The case for Python

1. It is the shortest distance between an idea and a working thing

Counting a file's words takes one line in Python and a small ceremony in most compiled languages. That difference compounds. When an experiment costs you five minutes instead of an hour, you run twenty times more experiments, and running more experiments is most of what learning and research actually are.

2. It reads like English, which matters more than it sounds

crew = ["Guybrush", "Elaine", "Otis"]

if "Otis" in crew:
    print("Otis is aboard.")

for member in crew:
    print(f"{member} reports for duty.")
Otis is aboard.
Guybrush reports for duty.
Elaine reports for duty.
Otis reports for duty.

You could read that aloud to a non-programmer and they would broadly follow it. Very few languages can say that. It matters because, as the Zen says, code is read far more than it is written.

3. The batteries are genuinely included

Python ships with a standard library that handles dates, files, zip archives, JSON, CSV, SQLite databases, HTTP, email, threading, random numbers, maths, testing, logging and unit conversion, all without installing anything. Then there is PyPI, the public package index, which passed half a million published packages. Whatever you want to do, someone has probably done the boring 80% of it already.

4. It owns science and machine learning outright

This is not marketing, it is where the field actually happens. NumPy and pandas are the standard tools for numerical work. PyTorch is what most AI research is written in. The Event Horizon Telescope team used Python to assemble the first image of a black hole, and LIGO publishes its gravitational wave analysis as Python notebooks. When you learn Python you are learning the language the tools of modern science are written in.

5. It is the glue language

Python is unusually good at telling other programs what to do: shell commands, web APIs, spreadsheets, databases, browsers, your operating system. A huge share of real-world Python is fifty lines that make four other systems talk to each other. Unglamorous, enormously useful, and the fastest route to your first genuinely handy tool.

INTERFACING[Medium: Success]

This is the part nobody puts on the brochure. Most working software is not a cathedral. It is a hundred small pipes connecting things that were never designed to meet. Python is the best pipe-fitting language ever made, and there is no shame in that at all.

Who actually runs it

WhoWhat they do with itSource
InstagramOne of the largest Django deployments on earth, serving billions of requestsInstagram engineering
NASA / JPLMission planning, data pipelines and analysisJPL open source
NetflixAlmost all of its operational tooling and data platformNetflix tech blog
SpotifyData pipelines and backend servicesSpotify engineering
DropboxWas built on Python; Guido himself worked there for yearsDropbox tech blog
CERN, LIGO, EHTThe analysis behind actual physics resultsgravitational wave tutorials
Basically every ML teamModel training, evaluation and servingPyTorch

The case against Python

A course that only sells you the upside is an advert. Here is where Python genuinely loses.

It is slow, and the reason is structural

Interpreted, dynamically typed code does far more work per operation than compiled code. A tight numeric loop in pure Python can be tens to hundreds of times slower than the same loop in C or Rust. In practice this rarely matters, because the heavy lifting is done inside libraries that are themselves written in C, Rust or Fortran. NumPy is fast because NumPy is not really Python. But if your hot loop is pure Python, you will feel it.

It lets you make mistakes that a compiler would catch

Python will happily run a program containing a typo in a branch you have not tested yet, then fail at 3am. Static languages catch that class of error before the program starts. Type hints and tools like mypy claw a lot of this back (Lesson 38), but it is opt-in, and opt-in safety is weaker than enforced safety.

Shipping it to other people is awkward

A Rust program compiles to a single file you can email to someone. A Python program is code plus an interpreter plus a set of dependencies, and getting all three onto a stranger's machine has spawned an entire industry of workarounds. It is much better than it was, and Lesson 50 covers the modern answers, but it is still Python's softest spot.

Threads do not do what you expect

For most of its life CPython has had a Global Interpreter Lock, which means ordinary threads do not give you more CPU. There are good workarounds (processes, async, native libraries), Python 3.13 introduced an experimental build without the lock, and Lesson 39 explains the whole situation honestly. But "just add threads" is not the answer here that it is elsewhere.

VOLITION[Medium: Success]

None of that is a reason to stop. It is a reason to know your tool. A chef is not embarrassed that a bread knife cuts bread badly when used as a screwdriver.

So when should you not pick Python?

If you need...ConsiderWhy
A game engine, an operating system, a browser coreRust, C++You need predictable speed and control over memory
A tiny single-file tool for strangers to downloadRust, GoOne compiled binary, no runtime to install
Code running in a web browserJavaScript, TypeScriptIt is the browser's native language
An iPhone or Android appSwift, KotlinFirst-class platform support and tooling
Squeezing the last 30% out of a hot loopRust, C, or NumPyOr write that one function in Rust and call it from Python. People do this constantly
🦀 The sister school

That last row is not a joke. Tools like PyO3 let you write the slow 5% of a Python program in Rust and call it as if it were Python. ruff, uv and Polars are all Python tools written in Rust, and they are 10 to 100 times faster than what they replaced. If that sounds appealing, the Rusty School is next door, and Lesson 51 here shows you the bridge.

The honest summary

Python is the best first language available, and remains a genuinely excellent tenth language. It optimises for the scarcest resource in any project, which is human attention. You will outgrow it in specific directions, and that is a good outcome: knowing exactly why you are reaching for another tool is what makes you an engineer rather than a fan.

Exercise 1

Pick the tool

For each job, would you reach for Python? Answer before revealing.

  1. Rename 4,000 holiday photos by the date they were taken.
  2. Write the firmware for a pacemaker.
  3. Analyse a 200MB spreadsheet of sales data and chart the trend.
  4. Build a competitive first-person shooter.
  5. Glue a weather API to a smart light so the bulb turns blue when rain is forecast.
Reveal solution
  1. Yes. Textbook Python. Twenty lines, ten minutes.
  2. No. Safety-critical, real-time, memory-constrained. That is C, Ada or Rust territory with certification requirements Python cannot meet.
  3. Yes. pandas plus matplotlib is exactly this job.
  4. Mostly no. The engine wants C++ or Rust. Python is often used for the scripting layer inside such engines, though.
  5. Yes. Two APIs and a bit of logic: peak glue language.
+100 XP