pub-3785248829033902 | Python: Operators | - Big data with Python

| Python: Operators |

Comparison operations and Operators are the symbols which tells the Python interpreter to do some mathematical or logical operation.

This table summarizes the comparison operations:
< strictly less than 
<= less than or equal 
> strictly greater than 
>= greater than or equal 
== equal 
!= not equal etc

The best way to learn new things is to take a practical approach of the things you want to learn. Here is a fragment of code that demonstrates the use of operators statement in Python:

Æ’ python command

a = [1,2,3]
b = [1,2,3]

if a == b:
    print('Yes')

if a is not b:
    print('no no no')

output

Yes
no no no


Previous
Next Post »