You can download this code by clicking the button below.
This code is now available for download.
The function uses the zip_longest method from the itertools library to combine multiple iterable objects. If the iterable objects are of unequal length, it fills them with fillvalue.
Technology Stack : itertools
Code Type : Function
Code Difficulty : Intermediate
def zip_longest(*args, fillvalue=0):
from itertools import zip_longest as _zip_longest
return _zip_longest(*args, fillvalue=fillvalue)