Lesson 161: Reading text streams safely (StringIO warmup)
Focus
This page is deliberate repetition with new literals: Basic drills Reading text streams safely (StringIO warmup); spin token 1319032 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence1mixesReading text streams safely (StringIO warmup); spin35724. - Ritual: Freeze one literal constant with a purposeful name aloud.
- Guardrail: pick the budget that keeps this rehearsal honest.
Example (LESSON_UID = "basic-161")
# Basic drill L161 topic-16 micro-0 pattern-10
LESSON_UID = "basic-161"
spin_a, spin_b, spin_c = 385, 248, 861
def gate(v):
if v < spin_a + 0:
return "low", v ** 2
if v > spin_b + 161:
return "high", v // max(1, 0 + 1)
return "mid", v + spin_c
cand = [0, 64, 291]
for candidate in cand:
lbl, val = gate(candidate)
print(candidate, lbl, val)
Practice
Practice 1: Swap print order once; reconcile dependency thinking. Literal nudge 1.
Fingerprints
- lesson_uid:
basic-161 - umbrella band:
Reading text streams safely (StringIO warmup)(1/10) - lesson_index:
5121