Identity Operators
Identity operators are used to check the object identity of two operands which doesn’t mean equality (==). We use ‘is’ and ‘is not’ operator. Actually, Identity operators compare the same operands with same memory locations. Two variables that are equal does not imply that they are identical.
Membership Operators
Python’s membership operators test whether a value or variable is found in a sequence (string, list, tuple, set and dictionary). If the value is present in the data structure, then the resulting value is true otherwise it returns false. These membership operations are an example of what makes Python so easy to use compared to lower-level languages such as C.
