Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to append to every second item in list python

a=[2,4,6]
for b in range (0,len(a)):
    a.insert(b*2,1)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #append #item #list #python
ADD COMMENT
Topic
Name
4+7 =