Equal signs in elif statement

In the pic I attached above, we state situation in two parts with an AND statement. However, on the right handside, we do not need that.

Anyone knows why?


See 6.10. Comparisons: https://docs.python.org/3/reference/expressions.html
Comparisons can be chained arbitrarily.

It’s not about elif specifically but such a pattern can appear anywhere a comparison can be used.

1 Like