find the max element in array in python code example
Example 1: find max value in list python
mylist = [1, 7, 3, 12, 5]
min_value = min(mylist)
max_value = max(mylist)
Example 2: find location of max value in python list
>>> m = max(a)
>>> [i for i, j in enumerate(a) if j == m]
[9, 12]