reemove white chactars python code example
Example 1: replacing spaces in a string python
mystring.replace(" ", "_")
Example 2: python delete white spaces
sentence = ' hello apple'
sentence.strip()
>>> 'hello apple'
mystring.replace(" ", "_")
sentence = ' hello apple'
sentence.strip()
>>> 'hello apple'