Created
October 11, 2010 21:39
-
-
Save narfdotpl/621290 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
Python 2.7 (r27:82500, Jul 6 2010, 21:27:24) | |
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> s = 'foo' | |
>>> s is s.lower() | |
False | |
>>> s is s.replace('a', 'b') | |
True | |
>>> s is s.replace('o', 'o') | |
False | |
Python 3.1.2 (r312:79147, Oct 11 2010, 23:34:00) | |
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> s = 'foo' | |
>>> s is s.lower() | |
True | |
>>> s is s.replace('a', 'b') | |
True | |
>>> s is s.replace('o', 'o') | |
False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment