Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 293 Bytes

20.md

File metadata and controls

21 lines (15 loc) · 293 Bytes
@author jackzhenguo
@desc 
@date 2019/2/20

20 求和函数

求和:

In [181]: a = [1,4,2,3,1]

In [182]: sum(a)
Out[182]: 11

In [185]: sum(a,10) #求和的初始值为10
Out[185]: 21
[上一个例子](19.md) [下一个例子](21.md)