if I have a dictionary like this
>>> d = {10: 3, 100: 2, 1000: 1}
I can type something like:
>>> d.get(10), d
Checkout this recipe Fuzzy matching dictionary.