Write a python function to sum all the numbers in a list
Answers
Answered by
9
Write a Python function to sum all the numbers in a list.
Sample Solution:-
Python Code:
def sum(numbers):
total = 0
for x in numbers:
total += x
return total
print(sum((8, 2, 3, 0, 7)))
Similar questions
India Languages,
6 months ago
English,
1 year ago