CBSE Class 11 Informatics Practices Question 34 of 80

Lists in Python — Question 12

Back to all questions
12
Question

Question 12

Which of the following functions will return the first occurrence of the specified element in a list?

  1. sort()
  2. value()
  3. index()
  4. Sorted()
Answer

index()

Reason — The index() function in Python returns the index of first matched item from the list.