• use str(f(x)) instead of f(x) as a key when building your dictionary
• then use preimages['1.27'] to get the preimages of 1.27