How do you append to the file instead of overwriting it?
(您如何附加到文件而不是覆盖文件?)
(有附加到文件的特殊功能吗?)
with open("test.txt", "a") as myfile: myfile.write("appended text")
2.1m questions
2.1m answers
60 comments
56.9k users