"Pablo Torres N." <tn.pa...@gmail.com> writes: > def split(seq, func=bool): > t = filter(func, seq) > f = filter(lambda x: not func(x), seq) > return list(t), list(f)
That is icky--you're calling func (which might be slow) twice instead of once on every element of the seq. -- http://mail.python.org/mailman/listinfo/python-list