def array.sum():
sm = 0
for a in array :
sm = sm + a
return sm
然后我想这样调用我的函数:
x = [3, 5, 6]
y = x.sum() # = 14
慕姐8265434
DIEA
相关分类