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

Python Intermediate — 001: Stress-test set deltas with repeatable chaos centred on `List and dict comprehensions` [536605]

Lesson 001: List and dict comprehensions

Focus

Compare against yesterday's mental model politely: Intermediate drills List and dict comprehensions; spin token 53728 makes this page unlike its neighbours.

Key ideas

Example (LESSON_UID = "intermediate-001")

# Intermediate drill L001 topic-0 micro-0 pattern-8
LESSON_UID = "intermediate-001"
spin_a, spin_b, spin_c = 984, 340, 868

pairs = [(35, 24), (0, 0), (1, 113)]
flat = 1
for left, right in sorted(pairs):
    print(left ^ right + flat % 997)

from pathlib import Path
import tempfile

with tempfile.TemporaryDirectory() as scratch:
    target = Path(scratch) / "scratch-1.txt"
    snap = [14, 11, 8]
    target.write_text("\n".join(str(x) for x in snap), encoding="utf-8")
    print("scratch_bytes", target.stat().st_size, "rolling", sum(snap) % (868 + 131))

Practice

Practice 11: Freeze async sleep at zero vs tiny float; articulate scheduling impact. Literal nudge 11.

Fingerprints