Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

insert in Python

# insert method places an element at an index you specify

foo = [1, 2, 3, 4]
foo.insert(1, 0.5)
print(foo)

# Output - [1, 0.5, 2, 3, 4]
Source by www.codeproject.com #
 
PREVIOUS NEXT
Tagged: #insert #Python
ADD COMMENT
Topic
Name
5+4 =