Mega Code Archive

 
Categories / Python Tutorial / List
 

Sum() function

a = [6, 4, 5] print sum(a) print sum(a, 5) a = [6., 4., 5.] print sum(a)