Python Quick Entry Lesson 10: Comparison Operators

Python Quick Entry Lesson 10: Comparison Operators

Python Comparison Operators

Operator Description Example (where a = 2, b = 3)
== Equal to a == b # Output False
!= Not equal to a != b # Output True
> Greater than a > b # Output False
< Less than a < b # Output True
>= Greater than or equal to a >= b # Output False
<= Less than or equal to a <= b # Output True

Disclaimer: The content is for reference only and does not guarantee accuracy!

Leave a Comment