def contains_duplicates(collection: list):
    """
    Returns whether or not the collection contains duplicates
    """

    current = collection[:]
    while len(current) > 1:
        item, current = current[0], current[1:]
        if any(map(lambda i: i == item, current)):
            return True
    return False