[Tutor] sorting algorithim

R. Alan Monroe amonroe at columbus.rr.com
Fri Apr 24 03:14:44 CEST 2009


> i know how to print for bubble sort in python, is there a way to
> print each pass in the sort so i can see what happens at each step? 
> thanks

A good first guess would be to try sticking "print list" in there in a
few different places.

Others will probably point out that "list" is a built-in keyword of
python so using it as a variable name may prevent you from using that
keyword.


Alan



More information about the Tutor mailing list