Most commonly a dictionary of key:value pairs is searched by the unique key. Sometimes it becomes necessary to search for the key, or keys given a value. Special consideration has to be given to this case, because the value does not have to be unique and may return several keys (list of keys).
A class inheriting the dictionary base class is used to do both searches. I have also made up some simple, but nicely named functions to search the dictionary, in case you don't want to use a class.