Is it possible to write an inequality with two arguments to be evaluated on one side in Python?

Question:

Is there a cleaner way of writing the following:

(a > b) and (a > c)

The following doesn’t work, but this might illustrate the kind of thing I’m looking for:

a > [b, c]

Asked By: Ben

||

Answers:

One option, use max:

a > max(b, c)
Answered By: phipsgabler

You could write c < a > b, but it’s pretty weird-looking. Probably clearer simply with a > b and a > c.

Answered By: khelwood