Data Structures
Map
Arrows point from what you learn first to what it opens. Point at a concept to light up its chain and where it comes back deeper. Right-click a concept (or press and hold it) for its lessons and stories.
- Proven to depth123
- Open
- Locked
- Comes back deeper
Learning path
In the order the concepts build on each other.
- ListsLockedAn ordered collection of values under one name, reached by position and able to grow, shrink and change - how a program keeps many values of the same kind.Opens after: Strings, Loops
- ComprehensionsLockedA one-line way to build a list, dictionary or set from a loop - what you want, where it comes from and which ones - instead of an empty list, a loop and append.Opens after: Lists, First-class functions
- DictionariesLockedA collection of key-value pairs that finds a value by its key in one step, like a phone book in code.Opens after: Lists
- ImmutabilityLockedA value that can't be changed after it's made, like a tuple or a string - safe to share, because nothing that holds it can alter it.Opens after: Lists
- Nested dataLockedCollections that hold other collections, like a list of rows for a grid - how a program stores tables, boards and structured records.Opens after: Lists
- Iterators and generatorsLockedObjects that hand out values one at a time, only when asked - what a for loop really uses - and generators, functions with yield that pause between values, so a program can work through more data than fits in memory.Opens after: Loops, Comprehensions
- Sets in codeLockedA collection that holds each value at most once, answers "is it in here?" at once, and combines groups with union and intersection.Opens after: Dictionaries
Connections to other domains
- Lists leads to Variables in codeProgram Basics
- Nested data leads to RecursionFunctions
- Sets in code leads to Algorithm efficiencyAlgorithms
- Comprehensions needs First-class functionsFunctions
- Iterators and generators needs LoopsControl Flow
- Lists needs StringsData Types
- Lists needs LoopsControl Flow
- Lists leads to First-class functionsFunctions
- Dictionaries leads to Classes and objectsObjects and Classes
- Dictionaries leads to Type annotationsWriting Correct Code