标签: python
我有问题。如何在Python中修改文本文件?
这是我的代码:
(with open "clues.txt") y = content.readlines
答案 0 :(得分:0)
以写入模式或追加模式打开它。
with open("clues.txt", "a") as f: f.write("your text")
通过python文档可以帮助你更多http://docs.python.org/3/tutorial/inputoutput.html