def contains(func, iterable):
    """
    Return true if one element of iterable for which function returns true.
    """
    if func is None:
        func = bool
    for x in iterable:
        if func(x):
            return True
    return False