Created
July 16, 2018 21:04
-
-
Save instinctive/730210142edbc79f22a254f47108d641 to your computer and use it in GitHub Desktop.
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 foo(x): x.append(9) | |
... | |
>>> a = [1,2,3] | |
>>> a | |
[1, 2, 3] | |
>>> b = a | |
>>> b | |
[1, 2, 3] | |
>>> foo(a) | |
>>> a | |
[1, 2, 3, 9] | |
>>> b | |
[1, 2, 3, 9] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment