maximum of a list 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: get biggest value in array python3
array = [1,2,3,100,4,5]
biggest = max(array)
print(biggest)
Example 3: max in a list python
li=[0,70,7,89]
max(li)
Example 4: maximum and index of a list pythopn
>>> m = max(a)
>>> [i for i, j in enumerate(a) if j == m]
[9, 12]
Example 5: python list max value
list1, list2 = [123, 'xyz', 'zara', 'abc'], [456, 700, 200]
print "Max value element : ", max(list1)
print "Max value element : ", max(list2)