usage of reduce
fredrik at pythonware.com
Tue May 8 08:51:31 CEST 2001
SC Zhong wrote:
> I am using version 1.5.2
> would somebody tell me why the following does not work.
> >>> z
> >>> reduce(lambda x,y: x+y, z)
hint: what does the lambda expression return? does the
return value support element access?
(reduce calls the function on the first and second element
in your sequence, and then on the resulting value and the
More information about the Python-list