From: "Lad" <[EMAIL PROTECTED]> wrote:
> In a text I need to > add a blank(space) after a comma but only if there was no blank(space) > after the comman > If there was a blank(space), no change is made. > > I think it could be a task for regular expression but can not figure > out the correct regular expression. re's are a pain. Do this instead: >>> s = "hello, goodbye,boo" >>> s.replace(', ',',') 'hello,goodbye,boo' >>> _.replace(',',', ') 'hello, goodbye, boo' >>> Hope this helps - Hendrik -- http://mail.python.org/mailman/listinfo/python-list