Menu

Coding and life :)

Iterating multiple lists at a time

I was writing a python script,I needed to iterate multiple iterator. At first I was planning to loop through each of the item.But I found it really non-pythonic. So I went through python docs to figure out if I can find something to get this code more pythonic.We can iterate iterator mainly two ways using zip() and using itertools.izip