Created
April 9, 2018 21:14
-
-
Save tamunoibi/8768539ed93bd5f6a882e0fc51eee0d7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def my_sort(list_numbers): | |
e_list = [] | |
o_list = [] | |
for x in list_numbers: | |
if x % 2 == 0: | |
e_list.append(x) | |
else: | |
o_list.append(x) | |
o_list.sort() | |
e_list.sort() | |
return o_list + e_list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment