Skip to content

Instantly share code, notes, and snippets.

@sugar700
Created November 21, 2017 14:58
Show Gist options
  • Save sugar700/f580b30e4c8b7ca48cc4dbe761919427 to your computer and use it in GitHub Desktop.
Save sugar700/f580b30e4c8b7ca48cc4dbe761919427 to your computer and use it in GitHub Desktop.
>>> def a(b=[]):
... return b
...
>>> x = a()
>>> y = a()
>>> x
[]
>>> y
[]
>>> x.append(3)
>>> x
[3]
>>> y
[3]
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment