≠
)
Unequal
[x, y] or x != y or x ≠ yFalse
if x and y are known to be equal, or True
if x and y are known to be unequal.
Commutative properties apply so if x != y then y != x.
For any expression x and y, Unequal[x, y]
== Not[Equal[x, y]]
.
1 != 1.
Comparisons can be chained:
1 != 2 != 3
1 != 2 != x
Strings are allowed:
Unequal["11", "11"]
Comparison to mismatched types is True:
Unequal[11, "11"]
Lists are compared based on their elements:
{1} != {2}
{1, 2} != {1, 2}
{a} != {a}
"a" != "b"
"a" != "a"
Unequal
using an empty parameter or list, or a list with one element is True. This is the same as 'Equal".
{Unequal[], Unequal[x], Unequal[1]}