def any_duplicates(iterable):
    """ Returns true if there are duplicate elements in list, dict keys, etc. """
    seen = []
    for elem in iterable:
        if elem in seen:
            return True
        seen.append(elem)
    return False