2019-02-18
阅读量:
787
如何处理文件路径中的\
如何处理文件路径中的 \ ?
print("c:\nowhere")
结果:
c:
owhere
答:可以再加 \ 来禁止特殊字符转义
print("c:\\nowhere")
c:\nowhere但是如果路径比较长这个方法是不好操作的。还有一种办法 在字符串前面加r
print(r"c:\nowhere")
c:\nowhere
0.0000
0
4
关注作者
收藏
评论(0)
发表评论
暂无数据
推荐帖子
0条评论
0条评论
0条评论

