def insertion_sort(L) :
for j in range(1,len(L)) :
a=L[j]
i=j
while L[i-1]>a and i>=1 :
L[i]=L[i-1]
i-=1
L[i]=a
print "List after pass",j,":",L
for j in range(1,len(L)) :
a=L[j]
i=j
while L[i-1]>a and i>=1 :
L[i]=L[i-1]
i-=1
L[i]=a
print "List after pass",j,":",L