Skip to main content
1 of 2
E. Chan-López
  • 31.3k
  • 3
  • 29
  • 50

Try Cases:

list={94, 35, 47, 29, 86, 40, 46, 72, 87};
List[Cases[list, Except[_?EvenQ]], Cases[list, Except[_?OddQ]]]
(*{{35, 47, 29, 87}, {94, 86, 40, 46, 72}}*)

With order:

List[Sort[Cases[list, Except[_?EvenQ]], Less], Sort[Cases[list, Except[_?OddQ]], Less]]
(*{{29, 35, 47, 87}, {40, 46, 72, 86, 94}}*)
List[Sort[Cases[list, Except[_?EvenQ]], Greater], Sort[Cases[list, Except[_?OddQ]], Greater]]
(*{{87, 47, 35, 29}, {94, 86, 72, 46, 40}}*)
E. Chan-López
  • 31.3k
  • 3
  • 29
  • 50