· beginner
Data Structures in Python
Lists, dictionaries, sets and tuples, and knowing which to reach for. Comprehensions, the mutability traps that catch everyone, and why a dictionary lookup beats a loop.
Written in house, from the work rather than from a syllabus. Every example is one we would use ourselves, and every exercise is checked against the same engine that grades your answer.
What you’ll learn
- Choose between a list, dict, set and tuple deliberately
- Use dictionaries for lookups instead of scanning a list
- Remove duplicates and compare collections with sets
- Write comprehensions that stay readable
- Avoid the mutable default and shared reference traps
- Sort and group data without reaching for a library
Before you start
- · Python Foundations, or comfort with variables, loops and conditionals