Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python search first occurrence in string

s = "the dude is a cool dude"
s.find('dude') # returns 4 - the first index of the first match in the string
Source by www.stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #search #occurrence #string
ADD COMMENT
Topic
Name
6+2 =