Closed kachayev closed 11 years ago
There is a (probably not optimal) solution here: http://docs.python.org/dev/library/itertools.html#itertools.accumulate
There is a (probably not optimal) solution here: http://docs.python.org/dev/library/itertools.html#itertools.accumulate