DEV Community

loading...
Cover image for Identity Operators in python

Identity Operators in python

aswin2001barath profile image Aswin Barath Updated on ・1 min read

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)

pic
Editor guide