Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

get all indices of a value in list python

indices = [i for i, x in enumerate(my_list) if x == "whatever"]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #indices #list #python
ADD COMMENT
Topic
Name
4+1 =