I'm trying to exclude control strings from (\n, \t, \u)
of strings in Python and I can not do it with either replace
or re.sub()
. How could I do it?
I've tried, and they have not worked:
p = re.sub('\n', '', p)
p.replace("\n","")