# sum of elements

# creating an empty list ### “'”

list = []

# number of elements as input

n = int(input("Enter number of elements : "))

# iterating till the range

for i in range(0, n):

elem = int(input())

```
list.append(elem) # adding the element
```

#print(list)

# sum of elements “”"

def sumlist(list):

sum=0

for i in range(len(list)):

sum = sum+list[i]

return sum

print(list)

print("sum of list: ",sumlist(list))