Check lists have same contents
Checks if two lists contain the same elements regardless of order.
- Use
set()
on the combination of both lists to find the unique values. - Iterate over them with a
for
loop comparing thecount()
of each unique value in each list. - Return
False
if the counts do not match for any element,True
otherwise.