# coding:utf-8from collections import namedtupleStudent = namedtuple('Student', ['no', 'name', 'age', 'sex'])student = Student("2016214338", u"张三", 19, u"男")print student.nameprint student.age
-----结果显示--------------------
张三19