[python] Why does checking a variable against multiple values with `OR` only check the first value?