(pred: T.Callable[[_T], object], iterable: T.Iterable[_T])
return filterfalse(pred, t1), filter(pred, t2)
Use a predicate to partition entries into false entries and true
    entries.

    >>> x, y = partition(is_odd, range(10))
    >>> (list(x), list(y))
    ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9])
Use a predicate to partition entries into false entries and true
    entries.
Use a predicate to partition entries into false entries and true entries .
def partition(pred: T.Callable[[_T], object], iterable: T.Iterable[_T]) -> T.Tuple[T.Iterator[_T], T.Iterator[_T]]:
    """Use a predicate to partition entries into false entries and true
    entries.

    >>> x, y = partition(is_odd, range(10))
    >>> (list(x), list(y))
    ([0, 2, 4, 6, 8], [1, 3, 5, 7, 9])
    """
    t1, t2 = tee(iterable)
    return filterfalse(pred, t1), filter(pred, t2)
def partition ( pred : T . Callable [ [ _T ] , object ] , iterable : T . Iterable [ _T ] ) -> T . Tuple [ T . Iterator [ _T ] , T . Iterator [ _T ] ] : t1 , t2 = tee ( iterable ) return filterfalse ( pred , t1 ) , filter ( pred , t2 )