Hi,

say I have a string like the following:
s1 = 'hi_cat_bye_dog'
and I want to replace the even '_' with ':' and the odd '_' with ','
so that I get a new string like the following:
s2 = 'hi:cat,bye:dog'
Is there a common recipe to accomplish that? I can't come up with any
solution...

Thanks in advance
Cesco
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to