为什么我这样写,输出的是同样的结果循环了循环了很多次:
L=range(1,101)
for i in L:
print L[6::7]
结果:
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]
[7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98]