The most Pythonic and efficient approach for this task is list comprehension with ".items()". You can also use filter and a lambda function.
Here is an example:
>>> aa={'a':123, 'b':323, 'c':123, 'd':123, 'e':453, 'f':56}>>> aa{'a': 123, 'b': 323, 'c': 123, 'd': 123, 'e': 453, 'f': 56}>>> [k for k, v in aa.items() if v == 123]['a', 'c', 'd']
>>> aa={'a':123, 'b':323, 'c':123, 'd':123, 'e':453, 'f':56}
>>> aa
{'a': 123, 'b': 323, 'c': 123, 'd': 123, 'e': 453, 'f': 56}
>>> [k for k, v in aa.items() if v == 123]
['a', 'c', 'd']
Another approach:
>>> list(filter(lambda key: aa[key] == 123, aa))['a', 'c', 'd']
>>> list(filter(lambda key: aa[key] == 123, aa))