← Back to archive

Stdle #19 · modern · 2026-06-25

What does this Python snippet output?

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

def deco(fn):
def wrap():
print("before")
fn()
print("after")
return wrap
@deco
def g():
print("body")
g()
Modern
3 lines
4 attempts left

Answer & explanation