I have following text output as a str():
"We\'ve ... here\'s why ... That\'s how ... it\'s"
As you see, there's always a "" before the apostrophe.
Then, I tried following:
text = text.replace("\", "")
SyntaxError: EOL while scanning string literal
Same happened with text.replace("\\", "") or text.strip("\").
What can I do to get rid of all \ in my text?
Thanks!
Solution:
\' is the way how Python outputs strings. Once you do print() or export the string, there's no issue.