1# any list
2a = [1, 7, 3, 12, 5]
3
4# index of minimum element
5# if more than 1 minimum,
6# first index is returned
7min_index = a.index(min(a))
8
9# index of maximum element
10max_index = a.index(max(a))
1import numpy as np
2
3x=[1,2,3,4,5]
4
5max_index=np.argmax(x)
6# return the index of the maximun element
7# max_index has the value 4