DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
can is slice list with list of indices python
lst = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'] indices = [0, 2, 6] out = [lst[i] for i in indices]
PREVIOUS
NEXT
Tagged:
#slice
#list
#list
#indices
#python
ADD COMMENT
Topic
COMMENT
Name
1+5 =
Submit