james2.txt的文本内容是这样的James Lee,2002-3-14,2-34,3:21,2.34,2.45,3.01,2:01,2:01,3:10,2-22,2-01,2.01,2:16
class Athlete:
#定义Athlete 类
def init(self ,a_name ,a_dob=None, a_times=[]):
self.name=a_name,
self.dob=a_dob,
self.times=a_times
def top(self):#返回最快的三个时间
return(sorted(set([sanitize(t) for t in self.times]))[0:3])
james=get_coach_data('james2.txt')
type(james.name)
结果显示jiames.name的类型是元组,为什么不是列表呢?在head first python书中就是列表