Skip to content

Home

Index of min element

Returns the index of the element with the minimum value in a list.

def min_element_index(arr):
  return arr.index(min(arr))

min_element_index([3, 5, 2, 6, 10, 7, 9]) # 2

More like this

Start typing a keyphrase to see matching snippets.