Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

insert list

# Python program to demonstrate 
# Addition of elements in a List
   
# Creating a List
List = [1,2,3,4]
print("Initial List: ")
print(List)
  
# Addition of Element at 
# specific Position
# (using Insert Method)
List.insert(3, 12)
List.insert(0, 'Geeks')
print("
List after performing Insert Operation: ")
print(List)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #insert #list
ADD COMMENT
Topic
Name
6+7 =