def unique_iter ( seq ) : seen = set ( ) return [ x for x in seq if x not in seen and not seen . add ( x ) ]
python is a set empty
See http : // www . peterbe . com / plog / uniqifiers - benchmark Originally f8 written by Dave Kirby
def unique_iter(seq):
    """
    See http://www.peterbe.com/plog/uniqifiers-benchmark
    Originally f8 written by Dave Kirby
    """
    seen = set()
    return [x for x in seq if x not in seen and not seen.add(x)]