Home / MCQ Bank / Computer
Computer Strings In Python

Which of the following methods is used to find the index of the first occurrence of a substring in a string?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • find()

Related Computer Questions

What will be the value of 'result' in following Python program? list1 = [1,2,3,4] list2 = [2,4,5,6] list3 = [2,6,7,8] result = list() result.extend(i for i in list1 if i not in (list2+list3) and i not in result) result.extend(i for i in list2 if i not in (list1+list3) and i not in result) result.extend(i for i in list3 if i not in (list1+list2) and i not in result) Which of the following is not a type of poly alphabetic cipher? Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1.count(5)? Which of the following is not true about tree sort? Which of the following methods can be used to solve the Knapsack problem?