def partition(predicate: Callable[([Any], bool)], iterator: Sequence[Any]) -> Tuple[(List[Any], List[Any])]:
    'A stable, out-of-place partition.'
    results = ([], [])
    for i in iterator:
        results[int(predicate(i))].append(i)
    return (results[1], results[0])
A stable, out-of-place partition.
def partition(predicate: Callable[([Any], bool)], iterator: Sequence[Any]) -> Tuple[(List[Any], List[Any])]:
    
    results = ([], [])
    for i in iterator:
        results[int(predicate(i))].append(i)
    return (results[1], results[0])