remove any qhitepsace charicter python code example Example 1: delete space in string python .replace(" ", "") Example 2: delete spaces in string python >>> s.replace(" ", "")