James Stroud wrote:
> On Friday 14 October 2005 08:37, Steve Holden wrote:
>> >>> dct = dict((x[1], x[0]) for x in enumerate(description))

To make the code a breath more obvious:
>>> dct = dict((name, seq) for seq, name in enumerate(description))
has the same results.

>> >>> dct
>>
>>{'second': 1, 'third': 2, 'first': 0}
>>


-- 
-Scott David Daniels
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to