Update min_element_index.md
This commit is contained in:
committed by
GitHub
parent
a2ff06d3a6
commit
8fbb356125
@ -8,8 +8,8 @@ Returns the index of the element with the minimum value in a list.
|
|||||||
- Use `min()` and `list.index()` to obtain the minimum value in the list and then return its index.
|
- Use `min()` and `list.index()` to obtain the minimum value in the list and then return its index.
|
||||||
|
|
||||||
```py
|
```py
|
||||||
def min_element_index(array):
|
def min_element_index(arr):
|
||||||
return array.index(min(array))
|
return arr.index(min(arr))
|
||||||
```
|
```
|
||||||
|
|
||||||
```py
|
```py
|
||||||
|
|||||||
Reference in New Issue
Block a user