You can download this code by clicking the button below.
This code is now available for download.
The function merges multiple iterable objects (such as lists, tuples, etc.) into an iterator. If the shortest iterable is traversed first, fillvalue is used to fill the remaining elements.
Technology Stack : itertools
Code Type : Function
Code Difficulty : Intermediate
def zip_longest(*args, fillvalue=None):
from itertools import zip_longest as _zip_longest
return _zip_longest(*args, fillvalue=fillvalue)