remove spacesfrom words python code example Example: python string remove whitespace ' sss d ssd s'.replace(" ", "") # output: 'sssdssds'