Last active
August 29, 2015 14:27
-
-
Save bryjbrown/64c39e967d38d25283a7 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
# instead of: | |
f = open('file.txt', 'r') | |
text = f.read() | |
# try this: | |
text = open('file.txt', 'r').read() | |
# you can do it on one line with one variable! | |
# less to read for the human, less to remember for the computer! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment