Python
The default language of data, ML, and quick scripts. Increasingly the second language even in JS-first stacks.
Mindmap
The plain-English version
Python is a general-purpose, high-level programming language. Released 1991. Reads almost like pseudocode. The default for data science, scripting, and machine learning. Web backend role is real but smaller than Node's.
The problem it solves
Python's gravity is in the data/ML world: NumPy, pandas, PyTorch, TensorFlow, scikit-learn — the libraries that defined modern ML. For backends, FastAPI and Django are credible choices. AI agents handle Python well; for any data pipeline, expect Python.
Alternatives
| Alternative | Type | When it wins |
|---|---|---|
| TypeScript | language | JavaScript with a type system. The language most production codebases use, even ones that look like JavaScript. |
| Node.js | runtime | JavaScript outside the browser. The runtime that powers most modern web backends, build tooling, and AI agent CLIs. |
Deep links
The words you'll hear
- pip
- The package installer.
pip install requests. - venv / virtualenv
- Isolated Python environments per project.
- uv, poetry
- Modern dependency tooling. uv is the new fast standard.
requirements.txt/pyproject.toml- Old / new manifests.
- PEP 8
- The style guide.
blackformats to it automatically. - List comprehension
[x*2 for x in nums]— Python's signature shape.- GIL
- Global Interpreter Lock. Why CPython doesn't truly thread. Use multiprocessing or async.
Bad vs. good prompt for Python
Why it works: Specifies Python version, validation library version (pydantic v1 vs v2 has different APIs), CLI tool, type hints, size budget, and asks for the dependency declaration. Concrete enough to ship.
What bites real teams
Stack Overflow still has Python 2 answers. print as a statement is a giveaway. Always specify Python 3.x.
Major API change. AI agents mix them. Pin and specify.
Python's asyncio is its own world. Mixing sync and async libraries deadlocks in subtle ways. Pick a side per app.