list1=[0,1,2,3,4,5]
i=0
while True:
a=1
b=2
i=i+1
if list1[i]=='2':
a=3
b=4
break
else:
continue
print(a,b)
去掉引号
if list1[i]==2: