📜  python删除连续空格 - Python代码示例

📅  最后修改于: 2022-03-11 14:46:27.386000             🧑  作者: Mango

代码示例1
# credit to the Stack Overflow user in the source link

import re
re.sub(' +', ' ', 'The     quick brown    fox')
>>> 'The quick brown fox'