python reduce multiple spaces to one without re code example Example: replace multiple spaces with single space python ' '.join(mystring.split())