def first(predicate, iterable):
    """
    Return the first item in *iterable* for which *predicate* returns ``True``.

    If *iterable* is empty or contains no items passing *predicate*, returns
    ``None``.
    """
    return next(filter(predicate, iterable), None)