import itertools


def partition(predicate, iterable):
    """Use a predicate to partition entries into false entries and true entries"""
    (t1, t2) = itertools.tee(iterable)
    return (itertools.filterfalse(predicate, t1), filter(predicate, t2))