David Isaac wrote: > What's the good way to produce a cumulative sum? > E.g., given the list x, > cumx = x[:] > for i in range(1,len(x)): > cumx[i] = cumx[i]+cumx[i-1] > > What's the better way?
Define better. More accurate? Less code? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list