-1

How does python evaluate this with both an 'and' and an 'or'?

lambda x: isinstance(x[1], Decimal) and (str(x[0]), str(x[1])) or (str(x[0]), x[1])
joannarch
  • 23
  • 4

1 Answers1

0

According to the documentation, the precedence for boolean operators is:

  • NOT is evaluated before all
  • AND is evaluated before OR
  • OR

Link: Operator Precedence

Mikael
  • 482
  • 8
  • 23