为什么最后一段不能执行 倒数第二段执行结果输出错误
L = range(1, 101)
print L[0:11]
print L[2::3]
for x in L :
n = 1
x = 3*n
n = n + 1
if x >100:
break
print L[x]
for a in L :
if a%5==0 and a<=50:
print L[a]
L = range(1, 101)
print L[0:11]
print L[2::3]
for x in L :
n = 1
x = 3*n
n = n + 1
if x >100:
break
print L[x]
for a in L :
if a%5==0 and a<=50:
print L[a]
2019-07-09
举报