What exactly is file.flush() doing? August 19, 2022 by Magenaut I found this in the Python documentation for File Objects: