I've been attempting to strip out the \n plus the whitespace before and after the words from a string, but it is not working for some reason.
This is what I tried:
.strip(my_string)
and
re.sub('\n', '', my string)
I have tried using .strip
and re
in order to get it working, but it simply returns the same string.
Example input:
\\n The people who steal our cards already know all of this...\\n
\\n , \\n I\'m sure every fraud minded person in America is taking notes.\\n
\\n
Expected output would be:
The people who steal our cards already know all of this..., I\'m sure every fraud minded person in America is taking notes.