Skip to content

Commit

Permalink
Finally code block
Browse files Browse the repository at this point in the history
  • Loading branch information
mshabana70 committed May 7, 2022
1 parent 4dd4a96 commit 58f9010
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Day-30/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,7 @@
# This will run if now exceptions were thrown
file_content = file.read()
print(file_content)
finally:
file.close() # Close file no matter what
print("File was closed.")

0 comments on commit 58f9010

Please sign in to comment.