[dictionary] how to get key by item

Roy Smith roy at panix.com
Mon Dec 13 21:12:46 EST 2004


"Delaney, Timothy C (Timothy)" <tdelaney at avaya.com> wrote:
> Python will do what you tell it.

Certainly it does.  The problem is that sometimes what I told it to do 
and what I think I told it to do are two different things :-)

> Using Python 2.4, the above can be rewritten as a generator expression:

Ah.  Very cool.  I really should take a look at 2.4.



More information about the Python-list mailing list