Hello,
I start in python and I don't understand the line (if min is not en_cours :) in this sorting by insertion program:
I start in python and I don't understand the line (if min is not en_cours :) in this sorting by insertion program:
A = [8,6,15,9,2,1,99,5,7] print (A) nb = len(A) for en_cours in range(0,nb): plus_petit = en_cours for j in range(en_cours+1,nb) : if A[j] < A[plus_petit] : plus_petit = j if min is not en_cours : print (min) temp = A[en_cours] A[en_cours] = A[plus_petit] A[plus_petit] = temp print(A)thank for your help Thierry