SyntaxFix
Write A Post
Hire A Developer
Questions
Open the file for 'append' rather than 'write'.
with open('file.txt', 'a') as file: file.write('input')