sum(iterable, start)
iterable : iterable can be anything list , tuples or dictionaries ,
but most importantly it should be numbers.
start : this start is added to the sum of
numbers in the iterable.
If start is not given in the syntax , it is assumed to be 0.
# Python code to demonstrate the working of
# sum()
numbers = [1,2,3,4,5,1,4,5]
# start parameter is not provided
Sum = sum(numbers)
print(Sum)
# start = 10
Sum = sum(numbers, 10)
print(Sum)
# Python code to demonstrate the working of
# sum()
numbers = [1,2,3,4,5,1,4,5]
# start parameter is not provided
Sum = sum(numbers)
print(Sum) # output:- 25
# start = 10
Sum = sum(numbers, 10)
print(Sum) # output:- 35