def separate_by_condition(items, bool_func=bool):
    """Return two lists of items separated by a condition.

    That is, we iterate over the items, evaluating them
    according to a condition given in the form of a
    boolean function.

    The items who don't pass are stored in the first list
    (the "false list") and those who do are stored in the
    second one (the "true list").

    Doctests
    ========

    >>> separate_by_condition([2, 4, 0, 22, 0, 11])
    ([0, 0], [2, 4, 22, 11])
    >>> separate_by_condition('AbcDefGhI', str.isupper)
    (['b', 'c', 'e', 'f', 'h'], ['A', 'D', 'G', 'I'])
    """
    ### create the false and true lists
    false_list, true_list = [], []

    ### reference their append method locally for easier
    ### and quicker access

    append_false = false_list.append
    append_true = true_list.append

    ### iterate over items, storing each of them in one of
    ### the lists, depending on whether they condition is
    ### evaluated to True or False

    for item in items:

        ## append item in "true list" if condition
        ## passes

        if bool_func(item):
            append_true(item)

        ## otherwise, append it in the "false list"
        else:
            append_false(item)

    ### finally return both lists
    return false_list, true_list
Return two lists of items separated by a condition.

    That is, we iterate over the items, evaluating them
    according to a condition given in the form of a
    boolean function.

    The items who don't pass are stored in the first list
    (the "false list") and those who do are stored in the
    second one (the "true list").

    Doctests
    ========

    >>> separate_by_condition([2, 4, 0, 22, 0, 11])
    ([0, 0], [2, 4, 22, 11])
    >>> separate_by_condition('AbcDefGhI', str.isupper)
    (['b', 'c', 'e', 'f', 'h'], ['A', 'D', 'G', 'I'])
    
nodezator/ourstdlibs/iterutils.py