Possible Duplicate:
python equivalent of filter() getting two output lists (i.e. partition of a list)
Is there any built-in function or maybe some module in python standard library, that simulates Enumerable.partition
behaviour from Ruby and iterates over an object just once to get two lists/tuples based on a predicate function passed?