Collections.namedtuple()

  • + 0 comments

    Enter your code here. Read input from STDIN. Print output to STDOUT

    from collections import namedtuple n=input() student=namedtuple('student',input().split()) Students=[student(*input().split()) for _ in range(int(n))] print(round(sum(int(i.MARKS) for i in Students)/int(n),2))