Python 删除字符串中的一根反斜杠可以使用字符串的 replace 方法: s= "hello\\world" s = s.replace("\\", "") print(s) # 输出 "helloworld"