1 | initial version |
This can be done via Python's itertools.accumulate function:
import itertools
h = itertools.accumulate(g, initial=0)
2 | No.2 Revision |
This can be done via Python's itertools.accumulate function:
import itertools
h = list( itertools.accumulate(g, initial=0)
initial=0) )