小编典典

Python-如何在Python中附加文件?

python

如何附加到文件而不是覆盖文件?有附加到文件的特殊功能吗?


阅读 651

收藏
2020-02-05

共1个答案

小编典典

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