Python for Engineers
Solve Problems by Coding Solutions - A Complete solution for python programming
Blog Pages
Blog
News
Distributions
NumPy Tutorials
Self Learning
IDE
Packages
About
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment