def duplicates ( coll ) : return list ( set ( x for x in coll if coll . count ( x ) > 1 ) )
python remove duplicate in collection
Return the duplicated items in the given collection
def duplicates(coll):
    """Return the duplicated items in the given collection

    :param coll: a collection
    :returns: a list of the duplicated items in the collection

    >>> duplicates([1, 1, 2, 3, 3, 4, 1, 1])
    [1, 3]

    """
    return list(set(x for x in coll if coll.count(x) > 1))