Combining Iterables with Fillvalue

  • Share this:

Code introduction


The function is used to combine multiple iterable objects. If the shortest iterable object is finished iterating, fillvalue is used to fill in the remaining elements.


Technology Stack : Built-in library

Code Type : Function

Code Difficulty : Intermediate


                
                    
def zip_longest(*args, fillvalue=None):
    zip_longest(*args, fillvalue=None)
    return zip_longest(*args, fillvalue=fillvalue)