2.2 如何为每个元组命名

# 2 命名的元祖
from collections import namedtuple
Student = namedtuple('Student',['name','age','sex','email'])
s = Student('jimi',16,'role','jian@qq.com')
s.age
s.name
s.email
原文地址:https://www.cnblogs.com/qianzi/p/6404721.html