You can download this code by clicking the button below.
This code is now available for download.
Create an iterator that aggregates elements from each of the iterables in the given iterable. If the iterables are of uneven length, missing values are filled-in with fillvalue.
Technology Stack : itertools
Code Type : Function
Code Difficulty : Intermediate
def zip_longest(*args, fillvalue=None):
from itertools import zip_longest as zl
return zl(args, fillvalue=fillvalue)