SyntaxFix
Write A Post
Hire A Developer
Questions
A simple soultion
>>> import re >>> s="The fox jumped over the log." >>> print re.sub('\s+',' ', s) The fox jumped over the log.