You can download this code by clicking the button below.
This code is now available for download.
This function combines iterable objects into tuples. If one of the iterable objects is exhausted, fillvalue is used to fill in.
Technology Stack : itertools
Code Type : Function
Code Difficulty : Intermediate
def zip_longest(*iterables, fillvalue=None):
zip_longest = itertools.zip_longest(*iterables, fillvalue=fillvalue)
return zip_longest