python remove spaces from text code example
Example 1: remove after and before space python
st = " a "
strip(st)
#Output : "a"
Example 2: strip whitespace python
>>> s.strip()
'Hello World From Pankaj \t\n\r\tHi There'
st = " a "
strip(st)
#Output : "a"
>>> s.strip()
'Hello World From Pankaj \t\n\r\tHi There'