售前咨询:400-0666-318
在python中对列表进行遍历并获取列表索引的方法
colours = ["red","green","blue"]for i, colour in enumerate(colours):print i, colour
colours = ["red","green","blue"]
for i, colour in enumerate(colours):
print i, colour
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读: python中怎么用pythonpath添加路径