The starmap()
is similar to the map()
function where we can iteratively pass values from a list as an argument to a function. The difference between them is that starmap()
supports passing multiple arguments to a function.
We can use starmap()
in cases where we want to call a function iteratively for every set of arguments in a list. starmap()
passes each argument set to the function and returns the results as an iterable.