[Tutor] Dictionary Values Questions

Tony Waddell toanenadiz at gmail.com
Tue May 1 17:41:18 CEST 2007

I am wondering how look for a key in a dictionary, given a value.

I have a dictionary similar to this:
a = { 'a1':1, 'a2':2, 'a3':3, 'a4'.:4}

If I have the value of 2, how would I look at the dictionary to turn
that into 'a2'.

More information about the Tutor mailing list