标签: python
import os path = r"D:/socket_pro/photo/folder_selected/" newPath = path.replace('/', '\\') print( newPath)
在这里,我必须使用python将/转换为\\到特定文件夹
最终输出应如下所示>> D:\\ socket_pro \\ photo \\ folder_selected \\