热线电话:13121318867

登录
2019-06-18 阅读量: 523
迭代时如何跟踪python列表的index?

迭代时如何跟踪python列表的index?

答:可以使用python的内置函数enumerate

for i,value in enumerate(collection):
pass

#其中 i 位索引 value 位序列的值。


0.0000
2
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子