如何删除python字符串中的所有空格?例如,我要一个字符串喜欢strip my spaces被变成stripmyspaces,但我似乎无法做到与strip():
strip my spaces
stripmyspaces
strip()
>>> 'strip my spaces'.strip() 'strip my spaces'
python spaces strip python-3.x
python ×1
python-3.x ×1
spaces ×1
strip ×1