"Henrik Holm" <news+0409 at henrikholm.com> wrote in message news:1gq9qs9.3snutr1s4mcn2N%news+0409 at henrikholm.com... > I suppose I could also use a lambda here -- but is there a different, > efficient, and obvious solution that I'm overlooking? Check the itertools recipes in the library documentation.