很弱,写了个特长的,可是不明白为什么不对,m加1后为什么没变
L = ['Adam', 'Lisa', 'Bart', 'Paul']
M=[]
N=[]
for index, name in enumerate(L):
M.append(index)
N.append(name)
for m in M:
m=m+1
L=zip(M,N)
for l in L:
print l[0], '-', l[1]
L = ['Adam', 'Lisa', 'Bart', 'Paul']
M=[]
N=[]
for index, name in enumerate(L):
M.append(index)
N.append(name)
for m in M:
m=m+1
L=zip(M,N)
for l in L:
print l[0], '-', l[1]
2017-10-15
举报