Iterating over multiple lists

0 votes
Is there a method to iterate over multiple lists at once without combining them?
Apr 25, 2018 in Python by pierre
1,480 views

1 answer to this question.

0 votes
import itertools
for item in itertools.chain(listone, listtwo): #listnames
...
answered Apr 25, 2018 by Nietzsche's daemon
• 4,260 points

Related Questions In Python

0 votes
1 answer

Return a list inside a for loop while iterating over the elements of another list

The print() is getting called multiple times ...READ MORE

answered Sep 22, 2018 in Python by SDeb
• 13,300 points
5,054 views
0 votes
1 answer

Iterating over dictionaries using 'for' loops

key is just a variable name. for key ...READ MORE

answered Oct 8, 2018 in Python by SDeb
• 13,300 points
1,001 views
0 votes
1 answer

Pandas dataframe with multiple lists in Python

You can do it like this import pandas ...READ MORE

answered Apr 6, 2019 in Python by Esha
1,880 views
0 votes
1 answer

How to delete items from a dictionary while iterating over it?

Hii Kartik, You could do it in two ...READ MORE

answered Apr 30, 2020 in Python by Niroj
• 82,840 points
2,894 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,463 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,120 views
0 votes
1 answer

Looping over two lists at once

You have to use the zip() function: for ...READ MORE

answered May 15, 2018 in Python by Nietzsche's daemon
• 4,260 points
1,719 views
0 votes
1 answer

Looping over dictionary values

You can loop over the dictionary and ...READ MORE

answered Apr 17, 2018 in Python by Nietzsche's daemon
• 4,260 points
641 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP