I receive a dictionary as input, and want to return a list of keys for which the dictionary values are unique in the scope of that dictionary.
I will clarify with an exa
A little more verbose, but does need only one pass over a:
revDict = {} for k, v in a.iteritems(): if v in revDict: revDict[v] = None else: revDict[v] = k [ x for x in revDict.itervalues() if x != None ]
( I hope it works, since I can't test it here )