I'm wondering if there is not a way to compute the complement of a list comprehension in Python. Something like:
evens = [i in range(10) if i % 2 == 0]
odds = [i in range(10) if i % 2 != 0]
is there a way to get both evens and odds in one call? For a very large list, or a more expensive if statement, I think this would save a lot of time.