列表 enumerat 解包, 针对索引和元素时间:2023-03-10 04:26:43 dic = [1,2,3,4,5] for a,b in enumerate(dic): print(a,b) # a就是索引 b是元素