← Back to archive

Stdle #15 · scope · 2026-06-21

What does this Python snippet output?

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

sum = 0
for n in [1, 2, 3]:
sum += n
print(sum)
del sum
print(sum([4, 5]))
Scope
2 lines
4 attempts left

Answer & explanation