with open('path/path/path/log.txt', 'a+', encoding='utf-8') as f:
f.write('内容')
f.write('内容')
f.close()
在python中的文件中写入数据(如写日志)
于 2023-08-01 21:55:44 首次发布
with open('path/path/path/log.txt', 'a+', encoding='utf-8') as f:
f.write('内容')
f.write('内容')
f.close()