Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to change multiple index in list in python

lst=[0,0,0,0,0]
lst[2::2] = [99, 98]
print s
# [0, 0, 99, 0, 98]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #multiple #index #list #python
ADD COMMENT
Topic
Name
4+2 =