Re: best cumulative sum
- From: Erik Max Francis <max@xxxxxxxxxxx>
- Date: Sun, 20 Nov 2005 22:07:42 -0800
Micah Elliott wrote:
On Nov 21, David Isaac wrote:>
What's the good way to produce a cumulative sum?
6import operator x = 1,2,3 reduce(operator.add, x)
Or just sum(x).
-- Erik Max Francis && max@xxxxxxxxxxx && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Never contend with a man who has nothing to lose. -- Baltasar Gracian .
- Follow-Ups:
- Re: best cumulative sum
- From: bonono@xxxxxxxxx
- Re: best cumulative sum
- From: Robert Kern
- Re: best cumulative sum
- References:
- best cumulative sum
- From: David Isaac
- Re: best cumulative sum
- From: Micah Elliott
- best cumulative sum
- Prev by Date: Re: Why are there no ordered dictionaries?
- Next by Date: Re: ownership problem?
- Previous by thread: Re: best cumulative sum
- Next by thread: Re: best cumulative sum
- Index(es):