Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 344 Bytes

77.md

File metadata and controls

16 lines (11 loc) · 344 Bytes
rank vote view answer url
77 1604 1634991 12 url

如何增加文件的内容?

如何做到 append 文件而不是覆盖?


with open("test.txt", "a") as myfile:
    myfile.write("appended text")