Knaph

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.

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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