Created
February 23, 2017 15:24
-
-
Save guestl/099aeeae96c2b3533972084154e20ea1 to your computer and use it in GitHub Desktop.
open file for writing From https://greppage.com/tejal29/26
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
| with open('workfile', 'w') as f: | |
| f.write("Override existing file if exists or create new") | |
| with open('workfile', 'a') as f: | |
| f.write("append to existsing file if exists or create new") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment