- Let's discuss python, not equal operators.
- In python, there are different types of operators available,in that we have not equal operators.
- Not equal to operator comes under the comparison operator as we compare the one variable with the other.
- Python not equal to the operator is used for the same data type values.
- When we compare one variable with another variable by using not equal operators we will get the boolean type values. bool type is True or False. if the values are not equal then it returns True value and if the values are equal then it returns the False value.
- The syntax for not equal to is != mostly used in the python 3 versions.
#1. write a python program to describe not equal to operator using integer
- a=2.5
- b=1.0
- c=5.0
- print(a!=b)
- true
- print(b!=c)
- true
- print(a!=b!=c)
- true
#2. write a python program to describe not equal to an operator using string
- Python, not equal operator using string
No comments