Returns the index of the element with the minimum value in a list.
min()
and list.index()
to obtain the minimum value in the list and then return its index.def min_element_index(arr):
return arr.index(min(arr))
min_element_index([3, 5, 2, 6, 10, 7, 9]) # 2
Python, Math
Returns the minimum value of a list, after mapping each element to a value using the provided function.
Python, Math
Returns the index of the element with the maximum value in a list.
Python, Math
Calculates the average of a list, after mapping each element to a value using the provided function.