delete white space in each element 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'