Jul-27-2022, 06:42 AM
Here is one way
import re string = "I don't like purple , I prefer red." string = re.sub('[\s],', ',', string) print(string)
Output:Python - fun.py:3
I don't like purple , I prefer red.
I don't like purple, I prefer red.
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts