三种遍历方式(使用第一和第二种更好)python
# [100, 95, 92, 89, 100, 91]# for score in scores:# print(score)## for i in range(len(scores)):# print(scores[i])# for (i, score) in enumerate(scores):# print(i, score)补充eumerate函数的使用方法,以及优点enumerate()使用如果对一个列表,既要遍历索引又要遍历元素时,首先可以..




