numbers = [1, 2, 3, 4, 5, 6] a = [num * 2 if num % 2 == 0 else num/2 for num in numbers] # [0.5, 4, 1.5, 8, 2.5, 12] bEven = [num for num in numbers if num % 2 == 0] # 2, 4, 6 bOdd = [num for num in numbers if num % 2 != 0] # 1, 3, 5