hyperion/cli/__init__.py
def partition(condition, collection) -> Tuple[List, List]:
    """Partitions a list into two based on a condition."""
    succeed, fail = [], []

    for x in collection:
        if condition(x):
            succeed.append(x)
        else:
            fail.append(x)

    return succeed, fail
def partition(condition, collection) -> Tuple[List, List]:
    succeed, fail = [], []

    for x in collection:
        if condition(x):
            succeed.append(x)
        else:
            fail.append(x)

    return succeed, fail
def partition ( condition , collection ) -> Tuple [ List , List ] : succeed , fail = [ ] , [ ] for x in collection : if condition ( x ) : succeed . append ( x ) else : fail . append ( x ) return succeed , fail
Partitions a list into two based on a condition.
Partitions a list into two based on a condition .