Skip to content

Instantly share code, notes, and snippets.

@kharioki
Created October 10, 2016 19:37
Show Gist options
  • Save kharioki/30d209d62b394368179fc5140b99f48a to your computer and use it in GitHub Desktop.
Save kharioki/30d209d62b394368179fc5140b99f48a to your computer and use it in GitHub Desktop.
def sort_mylist_asc(a):
for my_number in range(len(a)-1,0,-1):
for i in range(my_number):
if a[i]>a[i+1]:
temp = a[i]
a[i] = a[i+1]
a[i+1] = temp
return a
def second_places(a):
arr_sec = []
arr_sec = (a[1],a[-2])
return arr_sec
a = [54,26,93,17,77,31,44,55,20]
test = sort_mylist_asc(a)
print(second_places(test))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment