get rid of white space python code example
Example 1: python delete white spaces
sentence = ' hello apple'
sentence.strip()
>>> 'hello apple'
Example 2: how to strip white space of text in python?
sentence = ' hello apple'
" ".join(sentence.split())
>>> 'hello apple'