2019-06-18
阅读量:
523
迭代时如何跟踪python列表的index?
迭代时如何跟踪python列表的index?
答:可以使用python的内置函数enumerate
for i,value in enumerate(collection):
pass
#其中 i 位索引 value 位序列的值。






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论