def allUnique(x):
    seen = list()
return not any(i in seen or seen.append(i) for i in x)
allUnique([list('ABC'), list('DEF')])
allUnique([list('ABC'), list('DEF'), list('ABC')])
Checking if all elements in a list are unique