prog9_26.py

inventory = {"りんご": 3, "もも": 5, "ぶどう": 3}
for k, v in inventory.items():
    print(f"{k}は{v}個あります")

# プログラム9-26(メソッドitems)