Write the the syntax for find( ) method
Answers
Answered by
2
Explanation:
The find() method returns an integer value. If substring exists inside the string, it returns the index of first occurence of the substring. If substring doesn't exist inside the string, it returns -1.
༶•┈┈⛧┈♛Ritika♛┈⛧┈┈•༶
Answered by
0
Syntax and details of find( ) method
Explanation:
Python string method find() decides if string str occurs in the string, or in a substring of string if starting index beg and ending index end are stated.
- Syntax - str.find(str, beg=0, end=len(string))
- Parameters - str − Denotes the string to be searched.
beg − Denotes the starting index, by default, it is 0.
end − Denotes the ending index, by default its equal to the length of the string.
- Return Value - The function find() returns the value of an integer. If substring exists within the string it returns the substring's first occurrence index. If there is no substring within the string it returns -1.
Similar questions
Social Sciences,
5 months ago
Psychology,
5 months ago
Computer Science,
11 months ago
Physics,
1 year ago
Physics,
1 year ago