python remove more than white space in string 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'