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