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

2005-07-12 Thread Alan Green
Ric Da Force wrote: > Hi guys, > > Thank you all for your input! It was good to see so much convergence in the > approach! Just for divergence, you can also do this with regular expressions: >>> import re >>> re.sub("(.*),(.*)", r"\1 and\2", "C1, C2, C3") 'C1, C2 and C3' Alan. -- http://mail.

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

2005-07-12 Thread Bengt Richter
On Wed, 13 Jul 2005 03:47:07 +0800, "Ric Da Force" <[EMAIL PROTECTED]> wrote: >Hi guys, > >Thank you all for your input! It was good to see so much convergence in the >approach! Again, I think that it speaks loudly for the concise way of doing >thins in Python... Anyway, I have typed in all of

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

2005-07-12 Thread Ric Da Force
Hi guys, Thank you all for your input! It was good to see so much convergence in the approach! Again, I think that it speaks loudly for the concise way of doing thins in Python... Anyway, I have typed in all of the solutions and have gained a great understanding of how to do this in future. T