L1=['10','20','abc','Python']
print(L1)
[‘10’, ‘20’, ‘abc’, ‘Python’]
#enumerate
for i,value in enumerate(L1):
print(i,value)
0 10
1 20
2 abc
3 Python
#zip
L1=['name','age','city']
L2=['zhangsan',30,'Beijing']
list(zip(L1,L2))# take L1 and L2 Pairing ,List Convert to list
[(‘name’, ‘zhangsan’), (‘age’, 30), (‘city’, ‘Beijing’)]
# Normal order
for i in range(10):
print(i)
0
1
2
3
4
5
6
7
8
9
#reverse Reverse order display
for i in reversed(range(10)):
print(i)
9
8
7
6
5
4
3
2
1
0