i need to create 2 output list ( Even numbers and odd number lists) using if else in list comprehensions. i was able to do it with below code but interested to know on how to do it with if else statements.
numbers = [2,12,3,25,624,21,5,9,12]
even_number,odd_number = [x for x in numbers if x%2==0],[x for x in numbers if x%2==1]
output = [2, 12, 624, 12] [3, 25, 21, 5, 9]