辞書で食べ物を探しています。食べ物が見つからない場合はelseステートメントを呼び出したいのですが、何らかの理由で食べ物が最後のキーに見つからず、代わりに辞書の値が出力されます。あなたの助けが必要です。
fridge = {"cheese" : "so delicious", "crackers": "you will love it once you try it", "chicken soup": "delicous stuff"}
food_sought = "pepper"
if food_sought:
for food_sought in fridge:
print("I was able to find a something in our list of food: %s : %s" % (food_sought, fridge[food_sought]))
break
else:
print("We couldn't find the food you were looking for")