Early previewThis guide is in development. Items tagged verify are still being checked against official docs.
nebx Learn
GitHub
Menu
Home/Python/Basics
Py

Python

Readable, batteries-included, and the default language of AI.

Paradigm
Multi-paradigm, OOP, functional
Typing
Dynamic, strong, optional type hints
Memory
Reference counting + cycle GC
Runs
CPython bytecode interpreter
Concurrency
asyncio, threads (GIL), multiprocessing

Basics

The concepts you need before patterns make sense in Python.

Interpreter and bytecode

CPython compiles .py files to bytecode and interprets it. Everything, including functions and classes, is an object.

print("Hello, patterns!")

Dynamic typing with hints

Types are checked at runtime; annotations (def f(x: int) -> str) are checked by tools like mypy or pyright, not by the interpreter.

Data structures

list, tuple, dict and set cover most needs; comprehensions build them concisely.

Iterators and generators

yield produces values lazily, so pipelines can process large data with little memory.

Environments and packages

Isolate dependencies per project with venv (or uv / Poetry) and install from PyPI with pip.

Saved in this browser only. Part of Clean code foundations (0/5).