在原来文本的基础上添加新的信息 text = "新添加的内容" my_file = open('my file.txt','a') my_file.write(text) my_file.close() 结果: