标签:span family 元组 collect ons import port style from
# coding:utf-8
from collections import namedtuple
Student = namedtuple(‘Student‘, [‘no‘, ‘name‘, ‘age‘, ‘sex‘])
student = Student("2016214338", u"张三", 19, u"男")
print student.name
print student.age
-----结果显示--------------------
张三
19
标签:span family 元组 collect ons import port style from
原文地址:http://www.cnblogs.com/smileyes/p/6703363.html