Skip to content

Instantly share code, notes, and snippets.

@puyo
Created August 5, 2013 06:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save puyo/6153890 to your computer and use it in GitHub Desktop.
Save puyo/6153890 to your computer and use it in GitHub Desktop.
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