python sum method code example
Example 1: python sum
x = [1,2,3,4,5]
s = sum(x)
print(s) # 15
Example 2: python sum
a = 3
b = 5
c = sum (a + b)
print(c)
x = [1,2,3,4,5]
s = sum(x)
print(s) # 15
a = 3
b = 5
c = sum (a + b)
print(c)