You can download this code by clicking the button below.
This code is now available for download.
This function combines multiple iterable objects into a new iterator. If an iterable object has fewer elements, it fills with fillvalue.
Technology Stack : itertools
Code Type : Function
Code Difficulty : Intermediate
def zip_longest(*args, fillvalue=()):
from itertools import zip_longest
return list(zip_longest(*args, fillvalue=fillvalue))