Contribute Media
A thank you to everyone who makes this possible: Read More

Looping over multiple iterables at once

Description

Need to loop over two (or more) iterables at the same time? Don't use range. Don't use enumerate. Use the built-in zip function. As you loop over zip you'll get the n-th item from each iterable.

Details

Improve this page