Collections.namedtuple()

  • + 0 comments
    from collections import namedtuple
    
    N=int(input())
    sum_marks=0
    Student=namedtuple('Student',input().split())
    for i in range(N):
        row=input().split()
        xyz=Student(*row)
        sum_marks+=int(xyz.MARKS)
    print("{:.2f}".format((sum_marks/N)))
    # print(f'{(sum_marks/N):.2f}')