The Python fundamentals that actually stick
It's not about memorizing syntax: it's about understanding why code behaves the way it does. These are the concepts everything else rests on.
It's tempting to learn Python by copying code snippets until they work. The problem shows up weeks later, when that same pattern breaks in a slightly different context and there's no way to tell why.
Variables, types, and mutability
Python distinguishes between mutable types (lists, dictionaries) and immutable ones (tuples, strings, numbers). That distinction isn't an academic detail: it explains why modifying a list inside a function can change the original list, while reassigning a number doesn't.
def add_item(items, item):
items.append(item) # mutates the original list
numbers = [1, 2, 3]
add_item(numbers, 4)
print(numbers) # [1, 2, 3, 4]Functions as first-class citizens
In Python, a function can be assigned to a variable, passed as an argument to another function, or returned from another function — just like any other value. This idea underlies more advanced concepts like decorators and higher-order functions (map, filter, sorted with a key).
A concrete example
people = [{"name": "Ana", "age": 30}, {"name": "Luis", "age": 25}]
sorted_people = sorted(people, key=lambda p: p["age"])Errors and exceptions
A program that never handles errors isn't simpler, it's more fragile. Understanding try/except from the start — and why catching bare Exception is usually a mistake — keeps bugs from turning into a mystery.
From theory to practice
These fundamentals aren't learned by reading, they're learned by writing code and seeing what happens when something breaks. Explore the Python Developer path and practice every concept with instantly graded exercises.