def selection_sort(L) :
s=0
y=0
for j in range(len(L)) :
for i in range(y,len(L)) :
if L[s]>L[i] :
s=i
a=L[s]
L[s]=L[y]
L[y]=a
y+=1
print "List after pass",j+1,":",L
s=0
y=0
for j in range(len(L)) :
for i in range(y,len(L)) :
if L[s]>L[i] :
s=i
a=L[s]
L[s]=L[y]
L[y]=a
y+=1
print "List after pass",j+1,":",L