Logical operators

Logical operators are used to check different conditions and execute the code accordingly. For example, detecting a button interfaced to the Raspberry Pi's GPIO being pressed and executing a specific task as a consequence. Let's discuss the basic logical operators:

       >>>3==3 
True
>>>3==2
False
       >>>3!=2 
True
>>>2!=2
False
       >>>3>2 
True
>>>2>3
False
       >>>2<3 
True
>>>3<2
False
       >>>4>=3 
True
>>>3>=3
True
>>>2>=3
False
       >>>2<=2 
True
>>>2<=3
True
>>>3<=2
False