Created
October 10, 2016 19:37
-
-
Save kharioki/30d209d62b394368179fc5140b99f48a 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 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