1 from itertools import chain 2 3 -def uniqueChain(*args): 4 see = set() 5 for x in chain(*args): 6 if x not in see: 7 see.add(x) 8 yield x 9