Created
January 27, 2015 23:25
-
-
Save campaul/2504ebd760a9b9ae6b0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 3.4.2 (default, Jan 12 2015, 11:38:40) | |
[GCC 4.9.2 20141224 (prerelease)] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> def foo(x=[]): | |
... x.append('1') | |
... return x | |
... | |
>>> foo() | |
['1'] | |
>>> foo() | |
['1', '1'] | |
>>> foo() | |
['1', '1', '1'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment