Answer:
The answer is: index function and it will be used in the following manner:
>>> myList.index(7)
Step-by-step explanation:
List is one of the 4 built-in data types that are present in Python language. Lists are used to store same type of values. Indexes are used to access elements of lists in Python.
Various operations can be performed on the lists.
In the given question, we have to write the function that can be used to find the index of an element in the list.
Index function is sued for this purpose.
The syntax for index function is:
list_name.index(element)
So for the given list, to find the index of 7, the function will be written as:
>>> myList.index(7)
Hence,
The answer is: index function and it will be used in the following manner:
>>> myList.index(7)