Example 1 - This works:
def thisorthat():
var = 2
if (var == 3 or var == 2):
print "i see the second value"
elif (var == 2 or var == 15):
print "I don't see the second value"
thisorthat()
Example 2 - This does NOT work:
def thisorthat():
var = 2
if var == (3 or 2):
print "i see the second value"
elif var == (2 or 15):
print "I don't see the second value"
thisorthat() # "I don't see the second value"
Is there a way to compare a variable to an "OR" operator without repeating the variable twice in each line?