[Python-ideas] Start argument for itertools.accumulate() [Was: Proposal: A Reduce-Map Comprehension and a "last" builtin]

Tim Peters tim.peters at gmail.com
Sun Apr 8 21:48:36 EDT 2018


> >>> list(accumulate([1, 2, 3]))
> [11, 13, 16]

Wow!  I would have sworn that said

[1, 3, 6]

when I sent it.  Damn Gmail ;-)

> >>> list(accumulate([1, 2, 3], initial=10))
>  [10, 11, 13, 16]


More information about the Python-ideas mailing list