Search for mapping solution
Michael Chermside
mcherm at mcherm.com
Tue Jul 8 07:54:46 EDT 2003
Alan Kennedy writes:
> Must ..... resist ..... temptation ..... to ..... write .... oneliners
>
> D'oh! I'm so weak willed....
>
> >>> lines = [['fred','333','0,10'],['sam','444','1'],['fred','333','0,50']]
> >>> d = dict([(x[0], x[2]) for x in lines])
Speaking as the guy who just complained about the one-liners: "That's no
one-liner, that's just concise!"
Of course, it's the answer to a simpler question than what the OP posted. ;-)
> No more posting for me for a while.
Please continue... anyone willing to apologize when they're wrong is worth
hearing from.
Does-this-mean-I-have-to-apologize-for-picking-on-one-liners lly yours,
-- Michael Chermside
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
More information about the Python-list
mailing list