def unique_everseen ( iterable , filterfalse_ = itertools . filterfalse ) : # Itertools recipes:
 # https://docs.python.org/3/library/itertools.html#itertools-recipes
 seen = set ( ) seen_add = seen . add for element in filterfalse_ ( seen . __contains__ , iterable ) : seen_add ( element ) yield element
is a set iterable python
Unique elements preserving order .
def unique_everseen(iterable, filterfalse_=itertools.filterfalse):
    """Unique elements, preserving order."""
    # Itertools recipes:
    # https://docs.python.org/3/library/itertools.html#itertools-recipes
    seen = set()
    seen_add = seen.add
    for element in filterfalse_(seen.__contains__, iterable):
        seen_add(element)
        yield element