python take out whitespace code example
Example 1: strip whitespace python
>>> s.strip()
'Hello World From Pankaj \t\n\r\tHi There'
Example 2: python string remove whitespace
' sss d ssd s'.replace(" ", "")
# output: 'sssdssds'
>>> s.strip()
'Hello World From Pankaj \t\n\r\tHi There'
' sss d ssd s'.replace(" ", "")
# output: 'sssdssds'