Answers for "remove duplicate space in string in pytoon"

0

remove duplicate space in string in pytoon

>>> import re
>>> re.sub(' +', ' ', 'The     quick brown    fox')
'The quick brown fox'
Posted by: Guest on May-25-2021

Code answers related to "remove duplicate space in string in pytoon"

Python Answers by Framework

Browse Popular Code Answers by Language