代码的问题
i=0
L= ['Alice',66,'Bob', 'True', 'False', 100]
for i in L:
i= i + 1
if i % 2 !=0:
continue
print(i)
我的跟答案一样,为什么执行出现:
Traceback (most recent call last):
File "C:\Users\ZF\Desktop\test.py", line 4, in <module>
i= i + 1
TypeError: can only concatenate str (not "int") to str