You are viewing a single comment's thread. Return to all comments →
from collections import defaultdict n = int(input()) k = defaultdict(list) header = list(map(str, input().split())) listed = [] for x in range(n): listed.append(list(input().split())) for i, j in enumerate(header): for x in range(n): if (listed[x][i]).isnumeric(): k[j].append(int(listed[x][i])) else: k[j].append(listed[x][i]) print(f'{(sum(k.get('MARKS'))/n):.2f}')
this works even they change colomn order
Seems like cookies are disabled on this browser, please enable them to open this website
Collections.namedtuple()
You are viewing a single comment's thread. Return to all comments →
this works even they change colomn order