how to get the first occurence of a string in a string 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