def bubble_sort(L) :
for j in range(len(L)-1) :
print "------ Iteration",j+1,"------"
for i in range(len(L)-1) :
if L[i]>L[i+1] :
a=L[i+1]
L[i+1]=L[i]
L[i]=a
print "List after pass",i+1,":",L
for j in range(len(L)-1) :
print "------ Iteration",j+1,"------"
for i in range(len(L)-1) :
if L[i]>L[i+1] :
a=L[i+1]
L[i+1]=L[i]
L[i]=a
print "List after pass",i+1,":",L