Sorting first even numbers second odd numbers in Python Posted June 9, 2020 A have a list in Python : numbers = [ 5, 7, 2, 6, 1, 3, 44,14, 9 ] how to do a function to sort (ascending or descending) this list, but putting even numbers first, odd numbers in second place? ( see result below) sorted_numbers= [ 2, 6, 14, 44,1, 3, 7, 9] 1
Sorting first even numbers second odd numbers
in Python
Posted
A have a list in Python :
numbers = [ 5, 7, 2, 6, 1, 3, 44,14, 9 ]
how to do a function to sort (ascending or descending) this list, but putting even
numbers first, odd numbers in second place? ( see result below)
sorted_numbers= [ 2, 6, 14, 44,1, 3, 7, 9]