Created
August 26, 2016 09:39
-
-
Save luca3m/97f766bbf549171b4b7e44597dd7e113 to your computer and use it in GitHub Desktop.
Python oddities
This file contains 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
def func(param=[]): | |
param.append("test") | |
return param | |
assert func() == [ "test", ] | |
assert func() == [ "test", "test", ] | |
assert func() == [ "test", "test", "test" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment