Lesson 166: Reading text streams safely (StringIO warmup)
Focus
Prints are breadcrumbs, not ornamentation: Basic drills Reading text streams safely (StringIO warmup); spin token 1362514 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence6mixesReading text streams safely (StringIO warmup); spin43271. - Ritual: Sketch control flow as ASCII before trusting output.
- Guardrail: pick the budget that keeps this rehearsal honest.
Example (LESSON_UID = "basic-166")
# Basic drill L166 topic-16 micro-5 pattern-7
LESSON_UID = "basic-166"
spin_a, spin_b, spin_c = 325, 516, 997
src = [((k + 166) * spin_a + 5) % 241 for k in range(4 + 5 % 3)]
derived = [v * v if v % 2 == 0 else v + spin_b for v in src]
print("src", src)
print("derived", derived)
print("zip_sum", sum(x + y for x, y in zip(src, derived)))
Practice
Practice 33: Export checkpoints into bullets for teammate review. Literal nudge 33.
Fingerprints
- lesson_uid:
basic-166 - umbrella band:
Reading text streams safely (StringIO warmup)(6/10) - lesson_index:
5316