Re: best cumulative sum




Erik Max Francis wrote:
> Micah Elliott wrote:
>
> > On Nov 21, David Isaac wrote:
> >
> >> What's the good way to produce a cumulative sum?
> >
> >>>> import operator
> >>>> x = 1,2,3
> >>>> reduce(operator.add, x)
> > 6
>
> Or just sum(x).
>
He seems to want scanl

.



Relevant Pages

  • Re: best cumulative sum
    ... Erik Max Francis wrote: ... > Micah Elliott wrote: ... >>On Nov 21, David Isaac wrote: ... The OP asked for a cumulative sum; ...
    (comp.lang.python)
  • Re: best cumulative sum
    ... David Isaac wrote: ... > What's the good way to produce a cumulative sum? ... -- Richard Harter ... Prev by Date: ...
    (comp.lang.python)