Vidyalelo
Python · Q22

MCQs for Python Strings: Exam

Programming · Python · question 22

Q22

What is the purpose of the find() method for strings?

A.
Returns the index of the first occurrence of a substring
B.
Replaces a substring with another
Answer
C.
Counts occurrences of a substring
D.
Converts the string to lowercase

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board