Answers for "python remove consecutive spaces"

0

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'
Posted by: Guest on September-01-2021

Code answers related to "python remove consecutive spaces"

Python Answers by Framework

Browse Popular Code Answers by Language