in general <> means not equal to operator.but,
in Python 3 :
<> means nothing in Python 3 , if you use <> in your python code , it will generate the error.
x="star"
y="moon"
if(x<>y):
print("we are not in same ")
output :
if(x<>y):
^
SyntaxError: invalid syntax
so you cant use <> in the Python 3.
in Python 3 have alternative of <> is != or is not or operator.ne() method from operator module
so instead of using <> not equal to operator use alternative as below example:
!= not equal to exampe in Python
x="star"
y="moon"
if(x!=y):
print("we are not in same ")
output: it will print "we are not in same"
is not not equal to exampe in Python
x="star"
y="moon"
if(x is not y):
print("we are not in same ")
output : it will print "we are not in same"
operator.ne() not equal to exampe in Python
import operator
x="star"
y="moon"
if(operator.ne(x ,y)):
print("we are not in same ")
output : it will print "we are not in same"