4.3. Relational Operators

4.3. Relational Operators

You can use the following operators as relational operators

Relational Operators
OperatorMeaning
<Is less than
<=Is less than or equal to
>Is greater than
>=Is greater than or equal to
==Is equal to
!=Is not equal to

Some examples

>>> 1 < 2
True
>>> 3 > 34
False
>>> 23 == 45
False
>>> 34 != 323
True

// operator gives the floor division result

>>> 4.0 // 3
1.0
>>> 4.0 / 3
1.3333333333333333