DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
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)
PREVIOUS
NEXT
Tagged:
#find
#maximum
#element
#array
#python
ADD COMMENT
Topic
COMMENT
Name
7+6 =
Submit