| == | Equals |
| != | Not equal |
| < | Less than |
| > | Greater than |
| <= | Less than or equal to |
| >= | Greater than or equal to |
Here's a few examples of their usage.
Mostly self explanatory. You can store the value of the test in a variable by assigning it with the equals sign. As in:
c = x > y
If you examine the value of c, it will contain the boolean answer "False" because x = 1 and y = 2 and therefore x > y is False.


No comments:
Post a Comment