Replacing last comma in 'C1, C2, C3' with 'and' so that it reads 'C1, C2 and C3'

Ric Da Force ric at next-level.com.au
Tue Jul 12 02:43:55 EDT 2005


Hi,

I have a string such as 'C1, C2, C3'.   Without assuming that each bit of 
text is of fixed size, what is the easiest way to change this list so that 
it reads:
'C1, C2 and C3' regardless of the length of the string.

Regards and sorry for the newbie question,

Ric 





More information about the Python-list mailing list