Answers for "python function to find sum from list"

2

python To find the sum of all the elements in a list.

lst = []
num = int(input('How many numbers: '))
for n in range(num):
    numbers = int(input('Enter number '))
    lst.append(numbers)
print("Sum of elements in given list is :", sum(lst))
Posted by: Guest on August-18-2020

Code answers related to "python function to find sum from list"

Python Answers by Framework

Browse Popular Code Answers by Language