On Sat, May 8, 2010 at 4:09 PM, Günther Dietrich <gd.usenet at spamfence.net> wrote: [snip] > Too simple? No, not at all. I really only intended to point the OP to itertools, because it does lots of useful things exactly like this one. \t