-> 解决方案一:定义类似与其他语言的枚举类型也就是定义一系列数值常量
NAME,AGE,SEX,EMAIL = range(4)
student = ('Jim','21','male','jim723tmail.com')
#name
print(student[NAME])
#age
if student[AGE] >= 18:
pass
#sex
if student[SEX] == 'mail':
pass
-> 解决方案二:使用标准库中collections.namedtuple替代内置tuple
from collections import namedtuple
Student = namedtuple('Student',['name','age','sex','email'])
s = Student('Jim',16,'male','jim32r3422@mail.com')
print(s)