Sum of first n cubes: Difference between revisions
m
→Python :: Functional
(→Python :: Functional: Inlined call to itertools.accumulate) |
|||
Line 1,397:
'''
def go(a, x):
return a +
return accumulate(range(0, n), go)
|