def in_fridge():
try:
count=fridge[wangted_food]
except KeyError:
count=0
return count
fridge={'apples':10,'oranges':3,'milk':2}
wangted_food='apples'
in_fridge()
添加回答
举报
0/150
提交
取消