as salam. alhamdulillah to allah for giving us this life. 🙂
phyton programming language is an operator.
every object has an identity, a type and a value. an object’s identity never changes once it has been created; u may think of it as the object’s address in memory. the ‘is‘ operator compares the identity of two objects; the id() function returns an integer representing its identity (currently implemented as its address).
other word, both is or is not is an operator to compare the memory location of two objects. to obtain this memory location, we need to use the id() function. like these below examples:
1) a = “foo”
b = a
c = “bar”
5) a is b
6) a is c
7) a is not c