phone = {'mike':10,'sue':8,'john':3}
print [key for key, value in phone.items() if value == 3]

-> ['john']


-- 
Regards,

Diez B. Roggisch
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to