Tu pars camper avec un ami, et chacun a fait sa liste de matériel {objet: quantité}. Écris pack_together(mine, yours) pour renvoyer la liste commune : les quantités s’additionnent quand un objet figure sur les deux listes, tes objets d’abord, puis ceux que seul ton ami apporte.
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():
# ton code ici: ajoute l'objet de l'ami à total (à partir de 0 si total ne l'a pas)
pass
return total
Exécuter teste les exemples. Quand ils sont bons, appuie sur Envoyer.