I had a doubt on comparision operator in python. I would like to know if it's right or wrong.
I have certain output that is assigned to a variable. So let's say:
result1, result2, result3
Now I do a comparison like
if result1 == 0 and result2 == 0 and result3 == 0:
print "Success "
else:
print "failure"
My doubt is can this comparison done in this format
if 0 in (result1 , result2 ,result3):
print "Success"
else :
print "failure"
Is this right using Python? If not, then what's the reason?