I have a string that contains both double-quotes and backslashes that I want to set to a variable in Python. However, whenever I try to set it, the quotes or slashes are eit
Another way to end a string with a backslash is to end the string with a backslash followed by a space, and then call the .strip()
function on the string.
I was trying to concatenate two string variables and have them separated by a backslash, so i used the following:
newString = string1 + "\ ".strip() + string2