Skip to content

Instantly share code, notes, and snippets.

@abhinavkorpal
Created April 7, 2017 07:32
Show Gist options
  • Save abhinavkorpal/3ab5bb4f8e15a04188857c923a3a93eb to your computer and use it in GitHub Desktop.
Save abhinavkorpal/3ab5bb4f8e15a04188857c923a3a93eb to your computer and use it in GitHub Desktop.
Collections.namedtuple()
from collections import namedtuple
n, Student = input(), namedtuple('Student', raw_input())
print "%.2f" %( sum([float(stud.MARKS) for stud in [Student(*raw_input().split()) for _ in xrange(n)]]) / n )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment