I am trying to remove all spaces/tabs/newlines in python 2.7 on Linux.
I wrote this, that should do the job:
myString="I want to Remove all white spaces, new lines
and tabs "
myString = myString.strip('
')
print myString
output:
I want to Remove all white spaces, new lines
and tabs
It seems like a simple thing to do, yet I am missing here something. Should I be importing something?
See Question&Answers more detail:os