Last active
September 2, 2017 10:41
-
-
Save mugizico/ec5fe610c9ec915b05b3ba86c7bdfa7a 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 mugizi_sorter(fancy_list, *args): | |
for i in range(len(fancy_list)-1,0,-1): | |
for j in range(i): | |
if fancy_list[j]>fancy_list[j+1]: | |
temp = fancy_list[j] | |
fancy_list[j] = fancy_list[j+1] | |
fancy_list[j+1] = temp | |
[ fancy_list.append(fancy_name) for fancy_name in args] | |
return fancy_list | |
fancier_list = list(set([0, 1, 1, 2, 3, 5, 8, 13, 21, 34])) # you are even fancier if you know what this is | |
mugizi_sorter(fancier_list, "Farman", "JP") | |
print(fancier_list) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment