DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
9+5 =
Submit