Write a Python function to sum all the numbers in a list


Topic: Write a Python function to sum all the numbers in a list

Solution

def sum(numbers):
total = 0
for x in numbers:
total += x
return total
print(sum((8, 2, 3, 0, 7)))



List all Python Programs