chain(list1[],list2[], ...) iterates through the lists element by element.
chain(list1[],list2[], ...)
>>> from itertools import * >>> x = chain('12','654') >>> for i in x: >>> print(i)
1 2 6 5 4