Python‎ > ‎operator‎ > ‎

operator.ne


Definition
The method returns that a is not equal to b.

Syntax
operator.ne()
__ne__

Parameters
object

Examples
operator.__ne__(a,b)
The method returns with the set1 is not equal to set2.
>>> set1={4,5,6,7}
>>> set2={6,7,8,9,10}
>>> operator.ne(set1,set2)
True

The return is:
 >>> set1={4,5,6,7}
>>> set2={6,7,8,9,10}
>>> set1 !=set2
True
>>> 

The method is set is not equal to set2.
 >>>set1={4,5,6,7}
>>> set2={6,7,8,9,10} 
>>> set1. __ne__(set2)
True
>>>

Comments