Q:

pyton not equal

1!=0

##This is an examle of a "does not equal" statement##
4
if a != b:
if not a == b:
1
1 != 2  # The 'not equal to' symbol is !=
0
(a != b) #testing for not equel
0
>>> 'ABC' != 'ABC'
False
>>> 1 != 1
False
>>> {1: None, 2: None} != 10
True
>>> 1 != 1.0
False
0

New to Communities?

Join the community