(seq)
return any(True for s in seq if s in uniq or uniq.add(s))
Return True if there are any duplicate elements in ``seq``.

    Examples
    ========

    >>> from sympy.utilities.iterables import has_dups
    >>> from sympy import Dict, Set

    >>> has_dups((1, 2, 1))
    True
    >>> has_dups(range(3))
    False
    >>> all(has_dups(c) is False for c in (set(), Set(), dict(), Dict()))
    True
Return True if there are any duplicate elements in ``seq``.
Return True if there are any duplicate elements in seq .
def has_dups(seq):
    """Return True if there are any duplicate elements in ``seq``.

    Examples
    ========

    >>> from sympy.utilities.iterables import has_dups
    >>> from sympy import Dict, Set

    >>> has_dups((1, 2, 1))
    True
    >>> has_dups(range(3))
    False
    >>> all(has_dups(c) is False for c in (set(), Set(), dict(), Dict()))
    True
    """
    if isinstance(seq, (dict, set, C.Dict, C.Set)):
        return False
    uniq = set()
    return any(True for s in seq if s in uniq or uniq.add(s))
def has_dups ( seq ) : if isinstance ( seq , ( dict , set , C . Dict , C . Set ) ) : return False uniq = set ( ) return any ( True for s in seq if s in uniq or uniq . add ( s ) )