newbie: dictionary - howto get key value

G. Völkl gm.voelkl at t-online.de
Thu Mar 10 12:19:02 EST 2005


Hello,

I use a dictionary:

phone = {'mike':10,'sue':8,'john':3}

phone['mike']   --> 10

I want to know who has number 3?

3 -->  'john'

How to get it in the python way ?

Thanks
       Gerhard





More information about the Python-list mailing list