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
. Thanks again! Ric "Brian van den Broek" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ric Da Force said unto the world upon 12/07/2005 02:43: >> Hi, >> >> I have a string such as 'C1, C2, C3'. Without assuming that each bit of >&

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

2005-07-11 Thread Ric Da Force
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 -- http://mail.python.or

Re: Tricky Dictionary Question from newbie

2005-07-11 Thread Ric Da Force
How does setdefault work exactly? I am looking in the docs and can't figure it out... Ric "Ric Da Force" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thank you guys! (Reinhold, Mark and Markus) I must confess that I am > absolutely awe struck at

Re: Tricky Dictionary Question from newbie

2005-07-11 Thread Ric Da Force
nhold Birkenfeld" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Mark Jackson wrote: >> "Ric Da Force" <[EMAIL PROTECTED]> writes: >> >>> It is hard to explain but this is what I mean: >>> >>> Dict = {'rt': &

Tricky Dictionary Question from newbie

2005-07-11 Thread Ric Da Force
Hi all, I have a dictionary containing about 300 items, some of the values being repeated. Both keys and values are strings. How can I turn this thing on its head so that we create a key based on each unique value and build the values based on the keys corresponding to the repeated values? I

What are __slots__ used for?

2005-07-04 Thread Ric Da Force
I am a C# programmer and new to the language and I am trying to debug some code which uses this feature. Can anyone elaborate on what it is and how it is used? Regards, Ric -- http://mail.python.org/mailman/listinfo/python-list