Remova o python múltiplo
import re
re.sub(' +', ' ', 'The quick brown fox')
'The quick brown fox'
SemicolonForgotten
import re
re.sub(' +', ' ', 'The quick brown fox')
'The quick brown fox'
' '.join(myString.split())
" ".join(filter(bool, mystring.split(" ")))