CodeNebula
All paths

Python Fundamentals

Start with Python's history, then master the core language — types, functions, classes, and decorators.

0 / 26 completed0%
1

Birth of Python (1989–1991)

Python was created by Guido van Rossum during the Christmas holidays of 1989 at ...

Python
2

Python 2.0 — List Comprehensions & Unicode (2000)

Python 2.0 was released on October 16, 2000. It introduced list comprehensions (...

Python
3

Python 3.0 — The Great Divide (2008)

Python 3.0 ("Py3k") was released December 3, 2008. It deliberately broke backwar...

Python
4

The 2-to-3 Migration (2008–2020)

For 12 years, Python 2 and Python 3 coexisted. The migration tools (`2to3`, `six...

Python
5

CPython and Alternative Runtimes

CPython is the reference implementation — the C-based interpreter that Guido cre...

Python
6

Python 3.10 — Structural Pattern Matching (2021)

Python 3.10 introduced `match`/`case` (PEP 634), the most syntactically signific...

Python
7

Python 3.11 — Faster CPython (2022)

Python 3.11 delivered the first fruits of the "Faster CPython" project (funded b...

Python
8

Python 3.12–3.13 — JIT and Free-Threading (2023–2024)

Python 3.12 (Oct 2023) improved f-strings (arbitrary expressions inside), added ...

Python
9

Variables and Types

Python is dynamically typed — a variable is just a name bound to an object; the ...

Python
10

Control Flow

Python's control flow uses `if`/`elif`/`else`, `for` (iterating any iterable), `...

Python
11

Functions — *args, **kwargs, and Defaults

Python functions support positional args, keyword args, defaults, variadic posit...

Python
12

Lambda Functions

`lambda` creates an anonymous single-expression function. It's syntactically lim...

Python
13

Comprehensions

Python has four comprehension forms: list `[expr for x in it if cond]`, dict `{k...

Python
14

Generators and the `yield` Keyword

A generator function uses `yield` instead of `return` — calling it returns a gen...

Python
15

Decorators

A decorator is a callable that takes a function and returns a (usually modified)...

Python
16

Classes and Object-Oriented Programming

Python uses class-based OOP with dynamic dispatch. `__init__` is the initializer...

Python
17

Inheritance and MRO

Python supports multiple inheritance. The Method Resolution Order (MRO) determin...

Python
18

Dunder (Magic) Methods

Dunder methods (`__method__`) let classes integrate with Python's built-in opera...

Python
19

Context Managers and `with`

The `with` statement guarantees cleanup code runs even if exceptions occur. Any ...

Python
20

Exception Handling

Python exceptions are objects that inherit from `BaseException`. The hierarchy: ...

Python
21

Iterables, Iterators, and the Iterator Protocol

Python's `for` loop works on any *iterable* — an object that implements `__iter_...

Python
22

Type Hints (PEP 484)

Python 3.5 introduced type hints via PEP 484. They are not enforced at runtime —...

Python
23

Walrus Operator `:=` (Python 3.8+)

The walrus operator (`:=`, PEP 572) assigns a value to a variable and returns it...

Python
24

Structural Pattern Matching (`match`/`case`, Python 3.10+)

`match`/`case` (PEP 634) is not a simple switch — it performs structural decompo...

Python
25

Dataclasses (Python 3.7+)

`@dataclass` auto-generates `__init__`, `__repr__`, `__eq__` (and optionally `__...

Python
26

f-Strings and String Formatting

f-strings (PEP 498, Python 3.6+) embed expressions in string literals: `f"{expr}...

Python