Python Comporasion Operators

by Atakan

These operators can differently check whether they are logically correct or incorrect. Let me show you what I want to say.

In the table below, sample variables are as follows:
num1 = 10
num2 = 11

OperatorUse Case
==num1 == num2
!=num1 != num2
< num1 < num2
> num1 > num2
<= num1 <= num2
>= num1 >= num2

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. OK Read More