here is a dict example
ActivePython 3.1.2.3 (ActiveState Software Inc.) based on
Python 3.1.2 (r312: 79147, Mar 22 2010, 12:20:29) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> dict = {}
>>> dict [("127.0.0.1", "127.0.0.2")] = ["value", "value2", "value3"]
>>> dict [("127.0.0.1", "127.0.0.3")] = ["value", "value2", "value3"]
>>> dict [("127.0.0.1", "127.0.0.4")] = ["value1", "value2", "value3"]
Does anyone know of a clean, reliable way to return a list of dictionary keys whose values are identical regardless of the type of value?
in the above example, the first two entries have different keys, but identical values. I am looking for a clean way to get a list of these two keys.
source
share