【发布时间】:2020-09-26 05:13:24
【问题描述】:
我正在尝试在 Python 中将多行写入文本文件
with open('output.txt', 'w') as outfile:
outfile.write("open\n" +
"c:\files\file.scr"+
"close"
)
文件路径写不正确,
open
c:iles\drawing.dwgclose
有人可以建议如何编写文件路径吗?
【问题讨论】:
标签: python-3.x file