To write to an existing file, you must add a parameter to the open() function:
"a" - Append - will append to the end of the file
"w" - Write - will overwrite any existing content
Python for Absolute Beginners in English playlist: • Python for Absolute Beginnners in English
Connect with me:
LinkedIn
Facebook
Github
Instagram