1.字典
li = {"alex"," aric","Alex","Tony","rain"}
for i,j in enumerate(li,1):
new_j = j.strip()
print(i,new_j)
RESTART: C:/Users/wssar/AppData/Local/Programs/Python/Python37-32/1002q3.py
1 alex
2 Tony
3 Alex
4 aric
5 rain
>>>
2.列表
f = ["alex","tony","aleX","aric","rain"]
for i,j in enumerate(f):
print(i,j)
0 alex
1 tony
2 aleX
3 aric
4 rain