def reduce_list(data_set):
 seen = set()
 return [item for item in data_set if ((item not in seen) and (not seen.add(item)))]

def reduce_list ( data_set ) : seen = set ( ) return [ item for item in data_set if ( ( item not in seen ) and ( not seen . add ( item ) ) ) ]
reduce duplicate items in a list and preserve order .