You are viewing a single comment's thread. Return to all comments →
from collections import OrderedDict l=[] d=OrderedDict() for _ in range(int(input())): a=input() l.append(a) for i in l: j=i.split(" ") j[-1]=str(l.count(i)*int(j[-1])) d[" ".join(j)]=l.count(i) for i in d: print(i)
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 →