Skip to content

Instantly share code, notes, and snippets.

@mugizico
Last active September 2, 2017 10:41
Show Gist options
  • Save mugizico/ec5fe610c9ec915b05b3ba86c7bdfa7a to your computer and use it in GitHub Desktop.
Save mugizico/ec5fe610c9ec915b05b3ba86c7bdfa7a to your computer and use it in GitHub Desktop.
.
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