347

2 分钟

#sum

说明:获取最大值。

def sum(iterable, /, start=0): ''' 求和 :param iterable: 一个可迭代对象 :param start: 初始值 :return: 和 '''

示例:

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.

创建于 2025/5/9

更新于 2025/5/11