Logical not it return true of false
ex
a = not True
b = not False
o/p : False
True
Bitwise Not it return the compliment of number(1 to 0 and 0 to 1)
a = True
b = False
print ~a
print ~b
o/p
-2
-1
ex
a = not True
b = not False
o/p : False
True
Bitwise Not it return the compliment of number(1 to 0 and 0 to 1)
a = True
b = False
print ~a
print ~b
o/p
-2
-1
No comments:
Post a Comment