>>> help(sum)
Help on built-in function sum in module builtins:
sum(iterable, start=0, /)
Return the sum of a 'start' value (default: 0) plus an iterable of numbers
When the iterable is empty, return the start value.
This function is intended specifically for use with numeric values and may
reject non-numeric types.
>>> sum([1, 2, 3], start=3)
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
sum([1, 2, 3], start=3)
TypeError: sum() takes no keyword arguments
By the way, it is very annoying that the start value is not available, because it hampers the possibility to use sum with things like vectors. |