Re: looking up dictionaries by values

2005-03-10 Thread Steve Holden
Sandman wrote: Hi there, I'm still a bit new to Python, and had a question. I have a dictionary that looks like: PWD = \ { "root": 0, "joe": 200, "susan": 201, .. } In other words, the values are unique as well as the keys. I've run into a situation where I need to lookup t

Re: looking up dictionaries by values

2005-03-10 Thread James Stroud
See the thread from earlier today, this list (python-list@python.org). "newbie: dictionary - howto get key value" On Thursday 10 March 2005 06:26 pm, Sandman wrote: > Hi there, > I'm still a bit new to Python, and had a question. > I have a dictionary that looks like: > PWD = \ > { >"root

looking up dictionaries by values

2005-03-10 Thread Sandman
Hi there, I'm still a bit new to Python, and had a question. I have a dictionary that looks like: PWD = \ { "root": 0, "joe": 200, "susan": 201, .. } In other words, the values are unique as well as the keys. I've run into a situation where I need to lookup the item by val