But in my dictionary both keys and values are unique.
On Jul 14, 7:34 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 13 Jul 2008 16:21:11 -0700 (PDT), Kless > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > I need a dictionary where get the result from a 'key' (on left), but > > also from a 'value' (on right), how to get it? > > > I know that dictionaries aren't bidirectional, but is there any way > > without use two dictionaries? > > Just out of curiosity... What do you expect to have returned from... > > aDict = { "one" : "two", > "three" : "four", > "What?" : "two" } > > when looking for the value "two"? > > In a dictionary, the /keys/ are unique... but the /values/ can be > duplicates. -- http://mail.python.org/mailman/listinfo/python-list