DEV Community

Cover image for Identity Operators in python
Aswin Barath
Aswin Barath

Posted on • Updated on

Identity Operators in python

Identity operators are used to checking whether the objects are the same or not.

Fact: In python, all data types are implemented as an object.

is operator

Alt Text
Output:

True
False
True
Enter fullscreen mode Exit fullscreen mode

is not operator

Alt Text
Output:

True
False
True
Enter fullscreen mode Exit fullscreen mode

Code along and have fun ;)

Discussion (0)