What happens if you dont close your file after opening it


the lessons seem like not doing so will result in utter doom, but what does happen if you don't?


Python writes data to the file when we close it. If you don't close the file, no updates get written. They stay in the buffer.