The Python ‘is’ Operator
The Python is operator determines whether two references (variables or literals) point to the same object in memory, i.e. whether they are the same object. The is operator is different from the equality operator ==, which checks whether the values of potentially two objects are equal.