Lesson 045: Booleans, comparisons, and truthiness
Focus
This page is deliberate repetition with new literals: Basic drills Booleans, comparisons, and truthiness; spin token 383873 makes this page unlike its neighbours.
Key ideas
- Angle
Basic: micro cadence5mixesBooleans, comparisons, and truthiness; spin62558. - Ritual: Annotate every meaningful print before deleting noise.
- Own one invariant tied to
Basic.
Example (LESSON_UID = "basic-045")
# Basic drill L045 topic-4 micro-4 pattern-3
LESSON_UID = "basic-045"
spin_a, spin_b, spin_c = 701, 592, 384
sentinel = ([] or [])
sentinel = sentinel or [11]
print(bool(sentinel), sentinel)
pick = sentinel or "fallback-45"
print("chosen", pick)
Practice
Practice 14: Enumerate three pytest markers you'd decorate if this lived in CI. Literal nudge 14.
Fingerprints
- lesson_uid:
basic-045 - umbrella band:
Booleans, comparisons, and truthiness(5/10) - lesson_index:
1437