reduce() in Python – GeeksforGeeks
The reduce(fun,seq) function is used to apply a particular function passed in its argument to all of the list elements mentioned in the sequence passed along.This function is defined in “functools” module. Working : At first step, first two elements of sequence are picked and the result is obtained. Next step is to apply the … Read more