Comparison operators

Comparison operators compare two values and return either True or False. (Such expressions are sometimes called Boolean expressions.) Mathematically, a result of True equals 1 and False equals 0.

Symbol

Name

Definition

=

Equals

True if the items are equal

Not Equal To

True if the items are not equal

>

Greater Than

True if the value on the left exceeds that on the right

<

Less Than

True if the value on the left is less than the value on the right

Greater Than or Equal To

True if the value on the left is greater than or equal to the value on the right

Less Than or Equal To

True if the value on the left is less than or equal to the value on the right

Notes 

  • You can also use <> for Not Equal To (≠), >= for Greater Than or Equal To (≥), and <= for Less Than or Equal To (≤).