Actually, now that I think about it, the version using iter() has one advantage over your version: it will work correctly if passed either a list or an iterator. So, for versions of Python that have iterators, I'd use the iter() version, but for older versions of Python, I'd use your version.
P.S. I benchmarked your version; it ran in 22.0 seconds, just a gnat's whisker faster than the iter() version. -- Steve R. Hastings "Vita est" [EMAIL PROTECTED] http://www.blarg.net/~steveha -- http://mail.python.org/mailman/listinfo/python-list