← Curriculum track ← Learn hub
Quanta GenAI Curriculum · Python · Basic

Python Basic — 164: Nudge async relays under light mutation centred on `Reading text streams safely (StringIO warmup)` [579150]

Lesson 164: Reading text streams safely (StringIO warmup)

Focus

Slow tempo wins; narrate checkpoints aloud: Basic drills Reading text streams safely (StringIO warmup); spin token 1351762 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "basic-164")

# Basic drill L164 topic-16 micro-3 pattern-3
LESSON_UID = "basic-164"
spin_a, spin_b, spin_c = 354, 517, 326

sentinel = ([] or [])
sentinel = sentinel or [11]
print(bool(sentinel), sentinel)
pick = sentinel or "fallback-33"
print("chosen", pick)

Practice

Practice 21: Verbal-diff this against lesson 163 aloud. Literal nudge 21.

Fingerprints