import re
text = re.sub('\s\s+',' ',text)On Aug 26, 6:46 am, António Ramos <[email protected]> wrote: > I know its a simple question but > How to > Remove 2 or more spaces from a string in a simple line of code? > thank you
import re
text = re.sub('\s\s+',' ',text)On Aug 26, 6:46 am, António Ramos <[email protected]> wrote: > I know its a simple question but > How to > Remove 2 or more spaces from a string in a simple line of code? > thank you