Created
September 29, 2020 22:32
-
-
Save anna-anisienia/459198cacd08db10e8cab08135940086 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
myfile = open('data.txt', 'w') | |
try: | |
myfile.write('Hello from context manager!') | |
finally: | |
myfile.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment