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

Python Basic — 094: Nudge dict views with narrow scope centred on `Tuples for fixed bundles` [667962]

Lesson 094: Tuples for fixed bundles

Focus

Assume a reviewer executes this verbatim: Basic drills Tuples for fixed bundles; spin token 775401 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "basic-094")

# Basic drill L094 topic-9 micro-3 pattern-3
LESSON_UID = "basic-094"
spin_a, spin_b, spin_c = 816, 634, 736

sentinel = ([] or [])
sentinel = sentinel or [9]
print(bool(sentinel), sentinel)
pick = sentinel or "fallback-94"
print("chosen", pick)

Practice

Practice 15: Enumerate three pytest markers you'd decorate if this lived in CI. Literal nudge 15.

Fingerprints