ScanSkill

!= (not equal)

This != (not equal) relational operator returns a Boolean value stating whether two expressions are not equal.

Syntax

A != B

Here,

  • A: Any valid object.
  • B: Any valid object.

Examples

>>> 'ABC' != 'ABC'
False
>>> 1 != 1
False
>>> {1: None, 2: None} != 10
True
>>> 1 != 1.0
False
>>> a = 1
>>> b = 1
>>> a != b
False