Iterate over a dictionary by comprehension and get a dictionary,"dict((k, mimes[k]) for k in mimes if mimes[k] == 'image/tiff')"