Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python copy list from index

>>> x = ['a','a','a','b','a','a']
>>> c = x.index('b')
>>> x[:c]
['a', 'a', 'a']
>>> x[c:]
['b', 'a', 'a']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #copy #list #index
ADD COMMENT
Topic
Name
9+1 =