str = "abcd efg, gfe dcba\ hijk lmn" print(str.replace("\r\n"," "))
str = "abcd efg, gfe dcba\ hijk lmn" print(str.replace('/r/n',' '))
分别运行后结果都是
abcd efg, gfe dcbahijk lmn
参考资料:
https://blog.csdn.net/longforus/article/details/51925285
str = "abcd efg, gfe dcba\ hijk lmn" print(str.replace("\r\n"," "))
str = "abcd efg, gfe dcba\ hijk lmn" print(str.replace('/r/n',' '))
分别运行后结果都是
abcd efg, gfe dcbahijk lmn
参考资料:
https://blog.csdn.net/longforus/article/details/51925285