0
What is reduce function in python?
3 Respostas
+ 3
The real resource you should be looking for is https://docs.python.org/3/library/functools.html#functools.reduce
This is pythons manual. It will tell you every function as well an explanation, source code and implementation. Its important to read the actual manual as it will tell you the actual theory behind the functions purpose. Would you rather look at an online manual for your car or the actual manual made for your car? These are things we have to consider when trying to learn programming.
0
Python's reduce() is a function that implements a mathematical technique called folding or reduction. reduce() is useful when you need to apply a function to an iterable and reduce it to a single cumulative value.