Prepare repository for merge

This commit is contained in:
Angelos Chalaris
2023-05-01 22:43:50 +03:00
parent ab1ea476c5
commit a5ca5190e5
169 changed files with 0 additions and 626 deletions

View File

@ -0,0 +1,20 @@
---
title: Index of min element
type: snippet
tags: [math,list]
cover: two-cities
dateModified: 2020-11-02T19:28:27+02:00
---
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.
```py
def min_element_index(arr):
return arr.index(min(arr))
```
```py
min_element_index([3, 5, 2, 6, 10, 7, 9]) # 2
```