Asked 3 years ago
18 Sep 2021
Views 595
denyy

denyy posted

Python- not equal operator is not working

i am trying to check two integer value which is "not equal " to or not in Python,but it generate error notEqual related in Python


ab=102
bc=134
print(i.notEqual(j))

above code give me error as below :
'int' object has no attribute 'notEqual' in Python.

jaggy

jaggy
answered Sep 18 '21 00:00

There is no "notEqual" method in Python. so usage of i.notEqual(j) is not allowed in Python.
use != operator instead of "notEqual" method in your code.
so your code for not equal to check

ab=102
bc=134
print(i!=j)


!= return True or False
I don't know where you get that 'notEqual' method is used to check two integer value which is "not equal " or not in Python.

Post Answer