Operators

The following list summarizes the operator precedences in Python, from lowest precedence (least binding) to highest precedence (most binding).

Within each group, the operators group left to right (except for exponentiation, which groups from right to left).

Unless the syntax is explicitly given, operators are binary.

  1. Lambda expression: lambda (lambda) (lowest precedence)
  2. Boolean OR: or (or)
  3. Boolean AND: and (and)
  4. Boolean NOT: not x (<