← Back to archive

Stdle #65 · scope · 2026-08-10

What does this Python snippet output?

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

x = "global"
def f():
return x
x = "changed"
print(f())
Scope
4 attempts left

Answer & explanation