def duplicates(iterable):
    """Return duplicated (hashable) items from iterable preserving order.

    >>> duplicates(iter([1, 2, 2, 3, 1]))
    [2, 1]
    """
    seen = set()
    return [i for i in iterable if i in seen or seen.add(i)]