Skip to content

Instantly share code, notes, and snippets.

@jvanasco
Created October 9, 2012 23:09
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jvanasco/3862048 to your computer and use it in GitHub Desktop.
default argument
def f(a,L=[]):
L.append(a)
return L
for i in range(0,3):
print f(i)
for i in range(3,6):
print f(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment