remove duplicate space in string in pytoon

Solutions on MaxInterview for remove duplicate space in string in pytoon by the best coders in the world

showing results for - "remove duplicate space in string in pytoon"
Merick
12 Oct 2020
1>>> import re
2>>> re.sub(' +', ' ', 'The     quick brown    fox')
3'The quick brown fox'
4