Think about the expression in your
if
statement. You have to evaluate each expression to the left and right of the
or
operator separately, then apply the
or
operator to the results of those expressions.
So, on the first number in the list, you get:
if x > 10 or x < 34
plug in the 10 for x:
if (10) > 10 or (10) < 34
and evaluate each expression:
if false or true
The result of (False or True) is True
Do it again for your remaining numbers and, hopefully, you begin to see why that
or
operator is not appropriate and needs to be replaced with something else.
Oh, and 10 < 10 is FALSE, not true. If you want that to be true, you have to change the > to >=