python symbol for not equal code example
Example 1: not equal python
if a != b:
pass
if not a == b:
pass
Example 2: not equal to in python
>>> 'ABC' != 'ABC'
False
>>> 1 != 1
False
>>> {1: None, 2: None} != 10
True
>>> 1 != 1.0
False
if a != b:
pass
if not a == b:
pass
>>> 'ABC' != 'ABC'
False
>>> 1 != 1
False
>>> {1: None, 2: None} != 10
True
>>> 1 != 1.0
False