# -*- coding:utf-8 -*- classSolution: defreOrderArray(self, array): # write code here even=[x for x in array if x%2==0] odd=[x for x in array if x%2!=0] return odd+even
1 2 3 4 5
# -*- coding:utf-8 -*- classSolution: defreOrderArray(self, array): # write code here return sorted(array,key=lambda x :x%2==0)