join用的不错
a = "Hello, world" b = "你好,世界" c = "How are you?" with open(file='a.txt', mode='w', encoding='utf-8') as f: f.write('\n'.join([a, b, c])) f.write('\n' + '=' * 30)
wx5935381fcc679 ©著作权
join用的不错
a = "Hello, world" b = "你好,世界" c = "How are you?" with open(file='a.txt', mode='w', encoding='utf-8') as f: f.write('\n'.join([a, b, c])) f.write('\n' + '=' * 30)
上一篇:urllib基本用法(了解)
下一篇:保存数据到csv
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M