Thanks for the reply, so that answers the alternate rows case, but
there are plenty of other cases where you would want to know the index
of the item. The items() solution feels like a bit of a workaround and
presumably has performance implications. Would a mapi function not be
more efficient and elegant? Sorry if I'm missing something.
Rupert
On May 19, 4:13 pm, Bob Ippolito <
b...@redivi.com> wrote:
> Typically this is done with count or cycle and izip.
>
> izip(cycle(["odd", "even"]), someArray)
>