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

Python Basic — 138: Snapshot hypothesis stubs with deterministic seeds centred on `Returning useful values early` [731213]

Lesson 138: Returning useful values early

Focus

Let the literals expose mistaken assumptions quickly: Basic drills Returning useful values early; spin token 1135488 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "basic-138")

# Basic drill L138 topic-13 micro-7 pattern-3
LESSON_UID = "basic-138"
spin_a, spin_b, spin_c = 250, 353, 565

sentinel = ([] or [])
sentinel = sentinel or [2]
print(bool(sentinel), sentinel)
pick = sentinel or "fallback-7"
print("chosen", pick)

Practice

Practice 25: Swap print order once; reconcile dependency thinking. Literal nudge 25.

Fingerprints