索引并不都是从0 开始,可以自我定义的吗
L = ['Adam', 'Lisa', 'Bart', 'Paul']
R = range(1,5)
N=zip(R,L)
for index,name in zip(range(1,len(L)+1),L):
print index,'-',name
L = ['Adam', 'Lisa', 'Bart', 'Paul']
R = range(1,5)
N=zip(R,L)
for index,name in zip(range(1,len(L)+1),L):
print index,'-',name
2020-02-11
举报