You can download this code by clicking the button below.
This code is now available for download.
The function is used to combine multiple iterable objects. If the lengths of these iterables are inconsistent, it fills the shorter sequences 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_imp
return zip_longest_imp(*args, fillvalue=fillvalue)