<div>Hi,</div>
<div>I`m a python newbie and could use some help.</div>
<div> </div>
<div>I often do a loop over arbitrary number of sequences. I do it like this:</div>
<div> </div>
<div>for elem1 in seq1:</div>
<div> for elem2 in seq2:</div>
<div> do whatever seq1,seq2</div>
<div> </div>
<div>this isn`t nice I think. Is there some way I can say myiterator=geniousfunction(seq1,seq2,seq3)</div>
<div> </div>
<div>and then myiterator.next() and have it return the corresponding elemnts from all sequences like if</div>
<div> </div>
<div>seq1 = ['a','b']</div>
<div>seq2 = [1,2]</div>
<div> </div>
<div>I could get</div>
<div> </div>
<div>a 1</div>
<div>a 2</div>
<div>b 1</div>
<div>b 2</div>
<div> </div>
<div>also, how do you loop over all the elements that can be returned by myiterator?</div>