Created
June 26, 2012 16:39
-
-
Save akaptur/2996960 to your computer and use it in GitHub Desktop.
python is vs. ==
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
>>> a = [1,2] | |
>>> b = [1,2] | |
>>> c = a | |
>>> a is b | |
False | |
>>> a is c | |
True | |
>>> a == b | |
True | |
(From ocw.mit.edu) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment