Something like this can do it:
for key, value in a.iteritems():
if value == 10:
print key
If you want to save the associated keys to a value in a list, you edit the above example as follows:
keys = []
for key, value in a.iteritems():
if value == 10:
print key
keys.append(key)
You can also do that in a list comprehension as pointed out in an other answer.
b = 10
keys = [key for key, value in a.iteritems() if value == b]
Note that in python 3, dict.items
is equivalent to dict.iteritems
in python 2, check this for more details: What is the difference between dict.items() and dict.iteritems()?