Text from the official booklet. Refer to the PDF for original mathematical notation, formatting, and linked input files. Printed samples and inputs are reproduced as published.
Create a function that takes a list and returns a new list whereby all even numbers come before all odd numbers (no need to arrange in ascending order). list = [6345, 8879, 6505, 4771, 2114, 1285, 1508, 1495, 2361, 8895, 3561, 6401, 8215, 8389, 7153, 6159, 6009, 7319, 5065, 4462, 1239, 2049, 2021, 3178, 4799, 6062, 7111, 4457, 6188, 3426, 9836, 5819, 3512, 6558, 4624, 2147, 6464, 4660, 6356, 7926, 7623, 5072, 2527, 9114, 8543, 5712, 3829, 6133, 9012, 9539]