Control Flow: The if
, elif
, else
Statements Summary
Summary
Op. |
Meaning |
Ex1. |
Result |
Ex2. | Result |
---|---|---|---|---|---|
< | is less than |
a < b |
False |
a < 10 |
False |
<= | is less than or equal to |
a < b |
False | a <= 10 | True |
> | is more than |
a > b | True | a > 10 |
False |
>= | is more than or equal to |
a >= b | True | a >= 10 |
True |
== | is equal to |
a == b |
False | a == 10 |
True |
!= | is not equal to |
a != b |
True | a != 10 |
False |