def has_dups(seq):
 from sympy.core.containers import Dict
 from sympy.sets.sets import Set
 if isinstance(seq, (dict, set, Dict, Set)):
  return False
 uniq = set()
 return any((True for s in seq if ((s in uniq) or uniq.add(s))))

def has_dups ( seq ) : from sympy . core . containers import Dict from sympy . sets . sets import Set if isinstance ( seq , ( dict , set , Dict , Set ) ) : return False uniq = set ( ) 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 .