We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Collections.namedtuple()
Collections.namedtuple()
Sort by
recency
|
1062 Discussions
|
Please Login in order to post a comment
from collections import namedtuple
N, SM = int(input()), namedtuple('SM',input().split())
print(f"{(sum(map(lambda x : int(x.MARKS) ,[(SM(*(input().split()))) for _ in range(N)]))/N):.2f}")
How does the named tuple make this easier to do?