itertools is also written in c, so if you're working with a big nested list is long it will be a lot faster.<br><br><div class="gmail_quote">On Sat, May 8, 2010 at 5:40 PM, Tycho Andersen <span dir="ltr"><<a href="mailto:tycho@tycho.ws">tycho@tycho.ws</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">On Sat, May 8, 2010 at 4:09 PM, Günther Dietrich<br>
<<a href="mailto:gd.usenet@spamfence.net">gd.usenet@spamfence.net</a>> wrote:<br>
[snip]<br>
> Too simple?<br>
<br>
No, not at all. I really only intended to point the OP to itertools,<br>
because it does lots of useful things exactly like this one.<br>
<font color="#888888"><br>
\t<br>
</font><div><div></div><div class="h5">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>