I\'d like to compare multiple objects and return True only if all objects are not equal among themselves. I tried using the code below, but it doesn\'t work. If
True
You can check that all of the items in a list are unique by converting it to a set.
my_obs = [obj1, obj2, obj3] all_not_equal = len(set(my_obs)) == len(my_obs)