l=['a',1,[1,2,3],"大福","哈哈","爱你"]
for index, value in enumerate(l):
print("编号:",index,":",value)
问题
源码
l=[
[1,2,3],
[4,5,6],
[7,8,9]
]
for i,(x,y,z) in enumerate(l):
print(i,":", x,y,z)
l=['a',1,[1,2,3],"大福","哈哈","爱你"]
for index, value in enumerate(l):
print("编号:",index,":",value)
问题
源码
l=[
[1,2,3],
[4,5,6],
[7,8,9]
]
for i,(x,y,z) in enumerate(l):
print(i,":", x,y,z)