0% found this document useful (0 votes)
15 views15 pages

SL - Unit-1 Introduction of Python Programming

Identity operators in Python compare whether two variables refer to the same object in memory. The 'is' operator returns true if both variables are the same object, while 'is not' returns true if they are not the same object. Examples of these operators include 'x is y' and 'x is not y'.

Uploaded by

amimevada
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views15 pages

SL - Unit-1 Introduction of Python Programming

Identity operators in Python compare whether two variables refer to the same object in memory. The 'is' operator returns true if both variables are the same object, while 'is not' returns true if they are not the same object. Examples of these operators include 'x is y' and 'x is not y'.

Uploaded by

amimevada
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

✓ Python Identity Operators

Identity operators are used to compare the objects, not if they are equal, but if they are actually
the same object, with the same memory location:

Operator Description Example


is Returns true if both variables are the same object x is y
is not Returns true if both variables are not the same object x is not y

You might also like