← Back to archive

Stdle #119 · mutability · 2026-10-03

What does this Python snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

d = {}
a = d.setdefault('k', [])
b = d.setdefault('k', [])
a.append(1)
print(b)
Mutability
4 attempts left

Answer & explanation