could we use a list comprehension here instead? do we still need `len(value) != len(set(value))` in the condition below?