Iteration over two sequences

Terry Reedy tjreedy at udel.edu
Wed Jan 12 19:10:28 EST 2005


"It's me" <itsme at yahoo.com> wrote in message 
news:MrdFd.10646$5R.6473 at newssvr21.news.prodigy.com...
>I tried this and I got:
> [(1, 'a'), (2, 'b'), (3, 'c')]
> But if I change:
> a=[1,2]
> I got:
> [(1, 'c')]
> Why is that?  I thought I should be getting:
> [(1, 'a'),(2,'b')]
> ?????

Cut and paste the actual input and output for an interactive session with a 
freshly started interpreter and perhaps we can answer for sure.

Terry J. Reedy







More information about the Python-list mailing list