Computer Science, asked by vidyanagesh8, 10 hours ago

write a program to print the sum of all numbers stored in a list (python for loop)​

Answers

Answered by vedanshchhikara7
0

Answer:

Read the input number asking for the length of the list using input() or raw_input() .

Initialize an empty list lst = [] .

Read each number using a for loop .

In the for loop append each number to the list.

Now we use a predefined function sum() to find the sum of all the elements in a list.

Print the result.

HOPE THIS HELPS YOU :)

Similar questions