如果是取奇数呢?字符串非空将全部按1计算,字符明显不是奇数,怎么去除
num=0
L = ['Alice', 66, 'Bob', True, 'False', 100,33]
for x in L:
num=num+1
if num%2==0:
continue
print(x)
num=0
L = ['Alice', 66, 'Bob', True, 'False', 100,33]
for x in L:
num=num+1
if num%2==0:
continue
print(x)
2021-01-03
举报