mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Fix accumulate() example. (Reported by David Murray.)
This commit is contained in:
parent
d585218a75
commit
44efc6522a
1 changed files with 1 additions and 1 deletions
|
|
@ -824,7 +824,7 @@ itertools
|
|||
modeled on APL's *scan* operator and Numpy's *accumulate* function:
|
||||
|
||||
>>> from itertools import accumulate
|
||||
>>> list(accumulate(8, 2, 50))
|
||||
>>> list(accumulate([8, 2, 50]))
|
||||
[8, 10, 60]
|
||||
|
||||
>>> prob_dist = [0.1, 0.4, 0.2, 0.3]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue