In this Bite we compare two
listobjects for equality, a fundamental thing to understand in Python.
check_equalityfunction returning the various
Enumvalues (representing equality scores) according to the type of equality of the lists:
SAME_REFERENCEif both lists reference the same object,
SAME_ORDEREDif they have the same content and order,
SAME_UNORDEREDif they have the same content unordered,
SAME_UNORDERED_DEDUPEDif they have the same unordered content and reduced to unique items,
- and finally return
NO_EQUALITYif none of the previous cases match.
Have fun and keep calm and code in Python!