Created
February 18, 2019 05:25
-
-
Save Ventsislav-Yordanov/0a2edb6aeb68d782950309e429222642 to your computer and use it in GitHub Desktop.
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
try: | |
file = open("filename.txt") | |
file.write("Python is awesome!") | |
except: | |
print("An error occured when writing to the file") | |
finally: | |
file.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment