How to replace a comma

Lad python at hope.cz
Mon Dec 18 10:12:22 EST 2006



Thank you for ALL for help.
Hendrik,
your solution works great but
what is `_`  in
_.replace(',',', ')

for?
Thank you
La.

> 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




More information about the Python-list mailing list