python打印列表的下标和值的例子:
In [1]: list01=[1,4,5]
In [10]: def funct01(ll):
....: for index,value in enumerate(ll):
....: print index,value
....:
In [11]: funct01(list01)
0 1
1 4
2 5
python打印列表的下标和值的例子:
In [1]: list01=[1,4,5]
In [10]: def funct01(ll):
....: for index,value in enumerate(ll):
....: print index,value
....:
In [11]: funct01(list01)
0 1
1 4
2 5