We will see about 4 assignment operations in Python as below,
- Less than
- Greater than
- Equals to
- Not equals to
Less than:
num1= 10 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.
num2= 15
print(num1