L = [ 3,5,1 ]
for i in range(len(L)):
    m = L[i]
    indice = i
    for j in range(i+1,len(L)):
        if L[j] < m:
            m = L[j]
            indice = j
    a = L[i]
    L[i] = L[indice]
    L[indice] = a

print(L)
