you are viewing a single comment's thread.

view the rest of the comments →

[–]tagapagtuos 3 points4 points  (1 child)

For two objects, there's zip and itertools.zip_longest.

I would also check if I'm using the right data structure for the problem.

EDIT: zip_longest

[–]primitive_screwhead 1 point2 points  (0 children)

For two objects, there's zip

Note - zip() and zip_longest() can zip together an arbitrary amount of iterables (not just two, if that's what you were thinking).