Lists, tuples, dictionaries, sets, and complex data handling
The most-used data structure in Python. Create lists, modify them, sort them, loop through them, and start thinking in collections.
Turn verbose loops into elegant one-liners. List, dict, set, and generator comprehensions with filtering and conditional logic.
Immutable sequences for data that shouldn't change. Tuple packing, unpacking, named tuples, and when to pick tuples over lists.
Key-value pairs are fundamental to Python. Create dicts, access nested data, loop through them, and pick up patterns you'll reuse everywhere.
Unique, unordered collections. Great for deduplication, membership testing, and set math — union, intersection, difference.
The start:stop:step notation that works on strings, lists, and tuples. Reverse sequences, grab subsets, and use negative indices.
Assign multiple values at once, swap variables without a temp, and use * to capture the rest. A small feature you'll use surprisingly often.
sort() vs sorted(), reverse, key functions, and lambda-based custom ordering. Sort any data exactly the way you need.
Lists of dicts, dicts of lists, JSON-like structures — how to access, modify, and iterate through complex nested data in Python.
Why changing a 'copy' sometimes changes the original. Shallow vs deep copy, aliasing traps, and how to safely duplicate mutable objects.