def tri(L):
L1=[i for i in L]
n=len(L1)
for i in range(0,n-1):
i_min=i
for j in range(i+1,n):
if L1[j]<L1[i_min]:
i_min=j
if i!=i_min:
L1[i],L1[i_min]=L1[i_min],L1[i]
return(L1)
L1=[i for i in L]
n=len(L1)
for i in range(0,n-1):
i_min=i
for j in range(i+1,n):
if L1[j]<L1[i_min]:
i_min=j
if i!=i_min:
L1[i],L1[i_min]=L1[i_min],L1[i]
return(L1)
Aucun commentaire:
Enregistrer un commentaire