I have a string that is a sentence like I don't want it, there'll be others
So the text looks like this I don\'t want it, there\'ll be other
for some reason a \ comes with the text next to the '. It was read in from another source. I want to remove it, but can't. I've tried. sentence.replace("\'","'")
sentence.replace(r"\'","'")
sentence.replace("\\","")
sentence.replace(r"\\","")
sentence.replace(r"\\\\","")
I know the \ is to escape something, so not sure how to do it with the quotes
'I don\'t want it, there\'ll be other'in the source code? Or do you read the text from some file or input from the user?printthat variable it doesn't so up, so it is anltkproblem then? It is splittingdon\'t, all i see isdon