You can download this code by clicking the button below.
This code is now available for download.
This function merges multiple iterable objects into an iterator. If the iterable objects are of different lengths, it fills the shorter ones with the fillvalue.
Technology Stack : itertools
Code Type : Function
Code Difficulty : Intermediate
def zip_longest(*args, fillvalue=None):
from itertools import zip_longest
return list(zip_longest(*args, fillvalue=fillvalue))