Python File close() Method
Close a file after it has been opened:
Definition and Usage
close() method closes an open file.
You should always close your files, in some cases, due to buffering, changes made to a file may not show until you close the file.