python program for maximum and minimum in a list code example
Example 1: how to find second maximum element of an array python
maximum1 = max(lst)
maximum2 = max(lst, key = lambda x: min(lst)-1 if (x == maximum1) else x)
Example 2: minimum in list python
c=[4, 10, 2, 57]
print(min(c))
# 2