输出字典fruits中键值最大的键值对。请完善代码。 fruits={’’apple’’:10,’’mango’’:12,’’durian’’:20,’’banana’’:5} m=’apple’ for key in fruits.keys(): #此段

admin2019-09-02  36

问题 输出字典fruits中键值最大的键值对。请完善代码。
fruits={’’apple’’:10,’’mango’’:12,’’durian’’:20,’’banana’’:5}
m=’apple’
for key in fruits.keys():
#此段代码请完善
print(’{}:{}’.format(m.fruits[m]))

选项

答案fruits={’’apple’’:10,’’mango’’:12,’’durian’’:20,’’banana’’:5} m=’apple’ for key in fruits.keys(): if fruits[m]
解析
转载请注明原文地址:https://kaotiyun.com/show/Zj6p777K
0

最新回复(0)