# you probably want to use a space ' ' to replace ` ` mystring = mystring.replace(' ', ' ').replace(' ', '')