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

def uniqify ( seq ) : seen = set ( ) seen_add = seen . add return [ x for x in seq if ( ( x not in seen ) and ( not seen_add ( x ) ) ) ]
remove duplicates from list preserving order originally by dave kirby .