Zip
Published: Wednesday, Dec 26, 2007 Last modified: Thursday, Nov 14, 2024
This: http://db.cs.helsinki.fi/~hendry/faqwiz/faqw.py?req=show&file=faq06.048.htp Also uses zip
16:23 < hendry> What is it called when you iterate through two iteratable objects at the same time? I want to do something like : for i, j in list1, list2: # but it does not work
16:24 < mg> hendry: zip()
16:25 < mg> So ... for i, j in zip(list1, list2)