def _split_list_by_function(l, func):
    """For each item in l, if func(l) is truthy, func(l) will be added to l1.
    Otherwise, l will be added to l2.
    """
    l1 = []
    l2 = []
    for item in l:
        res = func(item)
        if res:
            l1.append(res)
        else:
            l2.append(item)
    return l1, l2