About 475 letters

About 2 minutes

#sum

Description: Get the sum.

def sum(iterable, /, start=0):
    '''
    Calculate the sum

    :param iterable: an iterable object
    :param start: initial value
    :return: the sum
    '''

Example:

print(sum([1,2,3,4,5,6,7,8,9]))
print(sum([1,2,3,4,5,6,7,8,9], 1000))

>>> Establishing WebAssembly Runtime.

>>> Standby.

Powered by Shift.

Updated: 6/9/2025

Author: PlanC

Created: 6/9/2025