Created
December 2, 2017 10:59
-
-
Save void4/a2a13b01cc8e7c5713819c2e3510c167 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
class X: | |
def __init__(self, l=[]): | |
self.l = l | |
a,b = X(), X() | |
print(id(a.l), id(b.l)) | |
a.l.append(1) | |
print(b.l) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment