经典的"获取元素的索引和元素", 背下来! if a in range(len(lst)): print(a, lst[a]) 转载于:https://www.cnblogs.com/jack20181017/p/9834002.html