You are viewing a single comment's thread. Return to all comments →
here's my code:
from collections import OrderedDict orders = OrderedDict() for i in range(int(input())): name, _, price = input().rpartition(' ') orders[name] = orders.get(name, 0) + int(price) [print(*item) for item in orders.items()]
Seems like cookies are disabled on this browser, please enable them to open this website
Collections.OrderedDict()
You are viewing a single comment's thread. Return to all comments →
here's my code: