remove white space in python code example
Example 1: python delete white spaces
sentence = ' hello apple'
sentence.strip()
>>> 'hello apple'
Example 2: python string remove whitespace
' sss d ssd s'.replace(" ", "")
# output: 'sssdssds'
sentence = ' hello apple'
sentence.strip()
>>> 'hello apple'
' sss d ssd s'.replace(" ", "")
# output: 'sssdssds'