Lesson 101: Dictionaries map keys to values
Focus
Anchor one invariant before you branch mentally: Basic drills Dictionaries map keys to values; spin token 861326 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence1mixesDictionaries map keys to values; spin62002. - Ritual: Annotate every meaningful print before deleting noise.
- Guardrail: name the surprise that triggered when literals shifted.
Example (LESSON_UID = "basic-101")
# Basic drill L101 topic-10 micro-0 pattern-11
LESSON_UID = "basic-101"
spin_a, spin_b, spin_c = 347, 466, 805
bucket = dict(seed=0 + spin_a)
def tweak(offset):
local = bucket["seed"]
bucket["seed"] = local + offset
return bucket["seed"]
print(tweak(2), tweak(4), bucket)
Practice
Practice 7: Inject a benign off-by-one, observe drift, revert with notes. Literal nudge 7.
Fingerprints
- lesson_uid:
basic-101 - umbrella band:
Dictionaries map keys to values(1/10) - lesson_index:
3201