首页 > 技术文章 > 列表 enumerat 解包, 针对索引和元素
niuli1987 2018-07-12 17:00 原文
dic = [1,2,3,4,5] for a,b in enumerate(dic): print(a,b) # a就是索引 b是元素