Identity Operator
Identity Operators
|
Description
|
Is
|
True returns when the same object is described.
|
Is not
|
True returns when different objects are
described.
|
Identidy Operators |
'is' Identity Operator
Source Code:a = 10
b = 17
c = 10
print (a is c)
print ((a <b) is (b> a))
Output:
True
True
'is not' Identity Operator
Source Code:a = 4
b = 5
print (a is not b)
Output:
True
0 Comments