Iterating through two lists

jb jblazi at hotmail.com
Fri May 24 05:56:54 EDT 2002


I have two lists, x and y with the property len(x) = len(y).

I should like to achive this (x is a list of class instances)

  for (a,b) in (x,y): a.f(b)

Is there a fancy way of doing this or have I to introduce an auxillary 
counter (that is very easy but maybe not very "lispy", that is 
"python-like").

-- 
Janos Blazi

"Il n'y a guère dans la vie qu'une préoccupation grave: c'est la mort;" 
(Dumas) 



-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----



More information about the Python-list mailing list