有两个内置方法可用1、count()方法可以返回某值在元组中出现的次数例如,返回7在元组中的次数thistuple = (1, 3, 7, 8, 7, 5, 4, 6, 8, 5)x = thistuple.count(7)print(x)执行结果:22、index()方法,返回某值在元组中第一个匹配项的位置例如thistuple = (1, 3, 7, 8, 7, 5, 4, 6, 8, 5)x = thistuple.index(8)print(x)执行结果:3