在原来文本的基础上添加新的信息

text  = "新添加的内容"
my_file = open('my file.txt','a')
my_file.write(text)
my_file.close()

结果:

python简单读取文件案例二

相关文章:

  • 2021-05-21
  • 2021-09-02
  • 2022-01-02
  • 2022-01-22
  • 2022-12-23
  • 2021-06-17
  • 2022-12-23
  • 2022-01-27
猜你喜欢
  • 2021-08-30
  • 2021-06-23
  • 2021-05-15
  • 2021-08-19
  • 2021-12-03
  • 2021-11-09
  • 2022-12-23
相关资源
相似解决方案