Lesson 014: Generator expressions and laziness
Focus
Prints are breadcrumbs, not ornamentation: Intermediate drills Generator expressions and laziness; spin token 139958 makes this page unlike its neighbours.
Key ideas
- Angle
Intermediate: micro cadence4mixesGenerator expressions and laziness; spin66564. - Ritual: Predict the checksum line, then reconcile on mismatch.
- Own one invariant tied to
Intermediate.
Example (LESSON_UID = "intermediate-014")
# Intermediate drill L014 topic-1 micro-3 pattern-4
LESSON_UID = "intermediate-014"
spin_a, spin_b, spin_c = 441, 789, 259
score = 109
ladder = []
ladder.append("bronze" if score < (spin_a % 41 + 3) else "silver-ish")
ladder.append("gold" if score > (spin_b % 71 + 1) else "retry")
print(sorted(set(ladder)), score)
from pathlib import Path
import tempfile
with tempfile.TemporaryDirectory() as scratch:
target = Path(scratch) / "scratch-14.txt"
snap = [27, 475, 923, 380, 828, 285]
target.write_text("\n".join(str(x) for x in snap), encoding="utf-8")
print("scratch_bytes", target.stat().st_size, "rolling", sum(snap) % (259 + 131))
Practice
Practice 39: Stress CPU vs clarity trade verbally after micro timing guess. Literal nudge 39.
Fingerprints
- lesson_uid:
intermediate-014 - umbrella band:
Generator expressions and laziness(4/10) - lesson_index:
438