Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find all indices of element in string python

def find(s, ch):
    return [i for i, ltr in enumerate(s) if ltr == ch]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #indices #element #string #python
ADD COMMENT
Topic
Name
9+5 =