#dict的values()方法,可以遍历也可以直接in判断是否存在a = {'a':1, 'b':2, 'c':3}if 4 in a.values(): print('exit')
keys_value = { 1:123,2:345,3:343 }yesOrno = "no"for key in keys_value.keys(): if(keys_value[key] == 345): yesOrno = "yes" break;print yesOrno