how to find the 2 max in a list python code example
Example: 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)
maximum1 = max(lst)
maximum2 = max(lst, key = lambda x: min(lst)-1 if (x == maximum1) else x)