← Back to archive

Stdle #14 · scope · 2026-06-20

What does this Python snippet output?

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

fns = [lambda: i for i in range(3)]
print([f() for f in fns])
Scope
4 attempts left

Answer & explanation