友だちとキャンプに行くので、それぞれ道具のリスト {thing: 個数} を作りました。pack_together(mine, yours) を書いて、合わせたリストを返しましょう。2 人とも持っていくものは個数を足します。順番は自分のものが先で、そのあとに友だちだけが持つものです。
pack_together({"tent": 1, "torch": 2}, {"torch": 1, "stove": 1})→{'tent': 1, 'torch': 3, 'stove': 1}pack_together({}, {})→{}def pack_together(mine, yours):
total = dict(mine)
for thing, n in yours.items():
# ここにコードを書く:友だちの道具を total に足す(total になければ 0 から)
pass
return total
実行すると例で試せます。よさそうなら提出しましょう。