list.index(element)
allows you to get the index of the specified element in a list. However, you cannot get the index using a function.
To get the index of an element in a list using a function, use the find_index
method instead.
list.index(element)
allows you to get the index of the specified element in a list. However, you cannot get the index using a function.
To get the index of an element in a list using a function, use the find_index
method instead.