split the results of an iterable based on a predicate

def partition(pred, iterable):
    """ split the results of an iterable based on a predicate """
    trues = []
    falses = []
    for item in iterable:
        if pred(item):
            trues.append(item)
        else:
            falses.append(item)
    return trues, falses