from collections import namedtuple #tuple元组
Student = namedtuple('Student',['name','age','sex','email'])
s = Student('jim',16,'male','jin8721@gmail.com')
print s.name #print(student[0])
print s.age #print(student[1])
from collections import namedtuple #tuple元组
Student = namedtuple('Student',['name','age','sex','email'])
s = Student('jim',16,'male','jin8721@gmail.com')
print s.name #print(student[0])
print s.age #print(student[1])