To add elements in list using insert

y=[]
n=int(raw_input('Enter the no of elements added to list:'))
index=0
for i in range(n):
      element=int(raw_input('Enter the elements:'))
      y.insert(index, element)
      index=index+1
print y

No comments: