2026-06-17 Β· BEGINNER Β· Five suspects. One is lying.
nums = [1, 2, 3] for i, n in enumerate(nums): nums[i] = n * 2 print(nums)
# (no error β modifying a list mid-enumerate IS safe for index-based assignment) [2, 4, 6]
def greet(name="World"): return f"Hello, {name}!" print(greet()) print(greet("Ada"))
# (no error) Hello, World! Hello, Ada!
x = 5 x += "abc" print(x)
Traceback (most recent call last): File "lineup.py", line 2, in <module> x += "abc" TypeError: unsupported operand type(s) for +=: 'int' and 'str'
def append_to(item, target=[]): target.append(item) return target append_to(1) append_to(2)
Traceback (most recent call last): File "lineup.py", line 6, in <module> append_to(2) ~~~~~~~~~^^^ MutableDefaultError: default argument 'target' was modified across calls
d = {1: "a", 2: "b", 3: "c"} print(list(d.keys()))
# (no error) [1, 2, 3]
The Stack Trace Lineup is a daily warm-up. The real curriculum is 1,300+ lessons of writing real code, not just spotting fakes. First 15 lessons free, no signup.
Tomorrow's lineup unlocks at 00:00 UTC. Past puzzles β