Ask Question
17 January, 05:25

In Python, what would I use if I wanted to iterate through two or more lists at the same time?

+4
Answers (2)
  1. 17 January, 05:44
    0
    Use the zip () function

    l1 = [1, 2, 3, 4, 5]

    l2 = ['a', 'b', 'c', 'd', 'e']

    for pair in zip (l1, l2):

    print (pair)
  2. 17 January, 06:53
    0
    ZIP IT that's how ...
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “In Python, what would I use if I wanted to iterate through two or more lists at the same time? ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers