The memory locations of two objects are compared using identity operators. Below are two Identity operators that will be explained.

Code :
x = ["red",”blue”]
y = ["yellow", "orange",”red”]
z=x
print(x is y)
print(x is z)
print(x is not y )
Output:
False
True
True
What is Python Membership Operator?
Members of a sequence, such as strings, lists, or tuples, are tested using Python’s membership operators. As mentioned below, there are two membership operators.

Code:
x = ["red",”blue”]
print(“red“ in x )
print(“yellow” not in x)
Output:
True
True