Solve Problems by Coding Solutions - A Complete solution for python programming
Blog Pages
▼
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:
Post a Comment