Managing text files with Python

24 Sep 2022

Mode Description
w Open a text file for writing. If the file exists, the function will remove all the contents as soon as you open it. If the file doesn’t exist, the function creates a new file.
a Open a text file for appending text. If the file exists, the function append contents at the end of the file.
+ Open a text file for updating (both reading & writing).

links

social