Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def f(x = []):
x.append(1)
return x
print f() # [1]
print f() # [1, 1]
print f() # [1, 1, 1]
print f() # [1, 1, 1, 1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment