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
>>>
原文地址:https://www.cnblogs.com/wssaried/p/9862681.html
时间: 2024-10-18 05:08:19