def deduplicate(seq):
 seen = set()
 return [x for x in seq if ((x not in seen) and (not seen.add(x)))]

def deduplicate ( seq ) : seen = set ( ) return [ x for x in seq if ( ( x not in seen ) and ( not seen . add ( x ) ) ) ]
remove duplicates from sequence wile preserving order .