Python – Assignment Operators

python-–-assignment-operators

We will see about 4 assignment operations in Python as below,

  1. Less than
  2. Greater than
  3. Equals to
  4. Not equals to

Less than:

num1= 10
num2= 15
print(num1

This will check whether num1 is less than num2, in this case yes num1 is less than num2. The output will be True.

Greater than:

print(num1>num2)

Since num1 is less than num2 in this example, the output will be False

Equals to:

print(num1==num2)

== means to check whether the value is equal / same.

As per the example, the output should be False

Not Equals to:

print(num1!=num2)

!= means to check whether it is not equals to

As per the example, the output should be False.

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
sunday-rewind:-key-experience-indicators-for-product-managers-by-tomer-sharon

Sunday Rewind: Key experience indicators for product managers by Tomer Sharon

Next Post
how-to-create-a-global-package-using-node.js

How to create a global package using Node.js

Related Posts