← Back to archive

Stdle #67 · classes · 2026-08-12

What does this Python snippet output?

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

class W:
def __str__(self): return "W-str"
def __repr__(self): return "W-repr"
d = {"k": W()}
print(d)
Classes
4 attempts left

Answer & explanation