将输出写入文档

mytxt = open('out.txt', mode='a', encoding='utf-8')
for i in range(10):
    print(i, file=mytxt)
mytxt.close()

 

相关文章:

  • 2021-06-09
  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-21
  • 2021-11-11
  • 2022-12-23
  • 2021-12-19
  • 2021-12-11
  • 2022-02-10
相关资源
相似解决方案