Created
September 22, 2014 00:28
-
-
Save studiawan/0b0e7dca44361b4bd43c to your computer and use it in GitHub Desktop.
Write to file using "with" statement
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
# write to file using with, no need to close file explicitly | |
with open('submission.html', 'w') as f: | |
f.write(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment