5 Dec 2020

Identity Operators

            They are used to check if two values (or variables) are located on the same part of the memory.

                         


Example:
x = 5 
y = 5 
print(x is not y)
print(x is y)

Output:
false
true


No comments:

Post a Comment

Operator precedence

           When an expression contains more than one operator, the order of evaluation depends on the order of operations.            The ac...