Category
programming
3 articles
Functions in Python: Parameters, Return Values, and Scope
TLDR: Python functions are first-class objects, not just reusable blocks. They support keyword arguments, safe defaults with None, variadic *args/**kwargs, closures, and LEGB scope resolution. These five ideas are not advanced features — they are the...
Python Data Structures: Lists, Dicts, Sets, and Tuples
TLDR: Python's four built-in collections are not interchangeable — their internals are fundamentally different. list is a dynamic array: fast at the end, slow for membership. dict is a hash table: O(1) key lookup, insertion-order-preserving since Pyt...
Python Basics: Variables, Types, and Control Flow
TLDR: Python variables are labels that point at objects — not typed boxes. The type lives with the object, not the variable. Master truthiness, f-strings, for/while loops, and the handful of pitfalls that trip up every developer coming from Java or J...
