Created
April 24, 2020 19:49
-
-
Save ZhouYang1993/cee63f98f8c47a8266f5159999ade8f5 to your computer and use it in GitHub Desktop.
File Handling in Python
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: | |
| f = open('test_file.txt', 'r') | |
| print(f.read()) | |
| finally: | |
| if f: | |
| f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment