import os list1 = ['a','b','c'] for index,aph in enumerate(list1) #把可遍历对象的数据以及其索引取出分别赋值给index,aph print(index,aph)
enumerate 模块
猜你喜欢
转载自www.cnblogs.com/Hale-wang/p/10268397.html
今日推荐
周排行