About this question
I want to eliminate all the whitespace from a string, on both ends, and in between words.
I have this Python code:
def my_handle(self): sentence = ' hello apple ' sentence.strip()
But that only eliminates the whitespace on both sides of the string. How python remove all spaces from string?