Exercise 1
def by_name(t): # 适用于名字和成绩排序不固定的tuple for x in t: if isinstance(x, str): return x
Exercise 2
def by_name(t): # 适用于名字和成绩排序不固定的tuple for x in t: if isinstance(x, int): return x
Sign in to make a reply
_JasonTong
Exercise 1
Exercise 2