python make all multiple spaces into one space code example Example: replace multiple spaces with single space python ' '.join(mystring.split())