How do I remove all the backslashes from a string in Python?
This is not working for me:
result = result.replace("\\", result)
Do I need to treat result as a raw string?
How do I remove all the backslashes from a string in Python?
This is not working for me:
result = result.replace("\\", result)
Do I need to treat result as a raw string?
Your code is saying to replace each instance of '\'
with result
. Have you tried changing it to result.replace("\\", "")
?