Created
February 13, 2015 15:34
-
-
Save datamafia/71d353ea7a85373df68c to your computer and use it in GitHub Desktop.
# Fast and haphazard introduction to repr in Python supports #twitter
This file contains hidden or 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
| #!/usr/bin/env python | |
| # Fast and haphazard introduction | |
| # to repr in Python | |
| g = 'x' | |
| print(g) # x | |
| # reprESENTATION is if... (terminal) | |
| print(repr(g)) # 'x' | |
| repr = 'y' | |
| print(repr) # y |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment