这个参考答案里的num变量是怎么参与到那个 list里去的
num = 0
L = ['Alice', 66, 'Bob', True, 'False', 100]
for item in L:
num = num + 1
if num % 2 != 0:
continue
print(item)
num = 0
L = ['Alice', 66, 'Bob', True, 'False', 100]
for item in L:
num = num + 1
if num % 2 != 0:
continue
print(item)
2021-07-03
举报