← Back to archive

Stdle #124 · mutability · 2026-10-08

What does this Python snippet output?

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

def grow(item, bag=[]):
bag.append(item)
return len(bag)
print(grow('a'), grow('b'), grow('c'))
Mutability
4 attempts left

Answer & explanation