📜  列表获取索引和值. - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:35.275000             🧑  作者: Mango

代码示例1
bb = ['one', 'two', 'three', 'infinity']

for ii, vv in enumerate(bb):
    print(ii, vv)

# 0 one
# 1 two
# 2 three
# 3 infinity