+2 votes
in Class 12 by kratos

Explain find() function?

1 Answer

+2 votes
by kratos
 
Best answer

find (sub[,start[,end]]) This function is used to search the first occurrence of the substring in the given string. It returns the index at which the substring starts. It returns -1 if the substring doesn’t occur in the string.

(eg) str = “computer” -

str.findf("om”) → 1

...