How to do two for loops in Python

Posted on: October 20th, 2022
By: Tadeo Martinez

for a, b in zip(random1, random2):
    print(a, b)

There’s also a question on StackOverflow about it:

https://stackoverflow.com/questions/1663807/how-do-i-iterate-through-two-lists-in-parallel

Have any questions or comments? Write them below!


Leave a Reply

Your email address will not be published. Required fields are marked *