摘要: enumerate 函数用于遍历序列中的元素以及它们的下标: >>> for i,j in enumerate(('a','b','c')): print i,j 0 a1 b2 c>>> for i,j in enumerate([1,2,3]): print i,j 0 11 22 3>>> f 阅读全文
posted @ 2016-11-22 18:20 范恒 阅读(5714) 评论(0) 推荐(0) 编辑