I was trying to check if a list is equal to either of the two target lists ; It did not work using or operator . What am I missing here and how to use use or operator in the below scenario?
k = [0 for i in range(9)]
k[2] = 1
if [k[i] for i in [0,1,2] ] == [0,0,0] or [0,1,1] : print ("yup")
else : print("NO")
result was yup while it should have been NO
#but worked when used elif
k = [0 for i in range(9)]
k[2] = 1
if [k[i] for i in [0,1,2] ] == [0,0,0] : print ("yup")
elif [k[i] for i in [0,1,2] ] == [0,1,1] : print ("yup")
else : print("NO")