def unique(iterable):
    """Filter out duplicate items from an iterable"""
    seen = set()
    for item in iterable:
        if item not in seen:
            seen.add(item)
            yield item
Filter out duplicate items from an iterable