def select_sort(lst):
    length = len(lst)-1
    while length > 1:
        imax = 0
        imax = max(lst[:length])
        indexmax = lst.index(imax)
        temp = lst[length]
        lst[length] = imax
        lst[indexmax] = temp
        length -= 1