Is there a way to see how many items in a dictionary share the same value in Python?
Let\'s say that I have a dictionary like:
{\"a\": 600, \"b\": 75
>>> a = {"a": 600, "b": 75, "c": 75, "d": 90} >>> b = {} >>> for k,v in a.iteritems(): ... b[v] = b.get(v,0) + 1 ... >>> b {600: 1, 90: 1, 75: 2} >>>