def split_by_predicate(iterable, predicate):
    """Split an iterable into two lists the according to a predicate

    Return a tuple of two lists:
    The first has the values for which `predicate` returned True
    The second has the values for which `predicate` returned False

    :param iterable: An Iterable[T]
    :param predicate: A function from T to bool
    """
    true, false = [], []
    for item in iterable:
        if predicate(item):
            true.append(item)
        else:
            false.append(item)

    return true, false