I'm new to Python. I'm creating a program to accept N numbers and find its sum using list. How can i add numbers to a list dynamically? This is what I'm at now.

```
n=int(input("enter the value of n"))
list=[]
for i in range(0,n):
    a=int(input("enter the value of number",i+1))
    list.append(a)
Sum=0
for num in list:
    Sum=Sum+ num
print("sum is",Sum)

```