How do I strip all the spaces in a python string? For example, I want a string like strip my spaces
to be turned into stripmyspaces
, but I cannot seem to accomplish that with strip()
:
>>> 'strip my spaces'.strip()
'strip my spaces'
How do I strip all the spaces in a python string? For example, I want a string like strip my spaces
to be turned into stripmyspaces
, but I cannot seem to accomplish that with strip()
:
>>> 'strip my spaces'.strip()
'strip my spaces'