摘要: 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-04-20 16:36 水·域 阅读(408) 评论(0) 推荐(0) 编辑