By the way, the timeit module is very helpful for comparing the speed of different implementations of an algorithm such as are being presented in this thread. You can find examples in the list archives: http://search.gmane.org/?query=timeit&group=gmane.comp.python.tutor Kent