Created
June 12, 2020 11:03
-
-
Save nitesh8860/6d46566f9500bcb8033885f84682b00c to your computer and use it in GitHub Desktop.
getting the second highest number in the list with help of filter in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
max_arr=max(arr) | |
arr=list(filter(lambda x: x!=max_arr, arr)) | |
print(max(arr)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment