Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python remove consecutive spaces

# credit to the Stack Overflow user in the source link

import re
re.sub(' +', ' ', 'The     quick brown    fox')
>>> 'The quick brown fox'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #remove #consecutive #spaces
ADD COMMENT
Topic
Name
8+6 =