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? Thanks, Alan Isaac