Skip to content

Instantly share code, notes, and snippets.

@bluecmd
Created November 7, 2016 17:34
Show Gist options
  • Select an option

  • Save bluecmd/d5182c2d17b2c5522f85a7da2f710a1c to your computer and use it in GitHub Desktop.

Select an option

Save bluecmd/d5182c2d17b2c5522f85a7da2f710a1c to your computer and use it in GitHub Desktop.
>>> def a(foo, bar=[]):
... bar.append(foo)
... print bar
...
>>> a(1)
[1]
>>> a(2)
[1, 2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment