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

def uniq_stable ( elems ) : seen = set ( ) return [ x for x in elems if ( ( x not in seen ) and ( not seen . add ( x ) ) ) ]
uniq_stable -> list return from an iterable .