import re
path = r'\\u7efc\\u5408'
r = re.sub(r'\\\\', r'\\', path)
print(r)

运行结果为

python \\替换为\

 

相关文章: