I have been reading all over the place, including Does Python have a ternary conditional operator?. It is supposed that
result = a if a > b else b
is better code than
result = a > b and a or b
But no one ever explains why. Will someone please elaborate?
If it's mere readability, then it's really just a matter of preference: some people will like the one and some people will like the other. So my question is: is there some really technical advantage for going one way versus the other.