find first occurrence of string in python code example
Example: 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
s = "the dude is a cool dude"
s.find('dude') # returns 4 - the first index of the first match in the string