Created
April 8, 2017 07:50
-
-
Save abhinavkorpal/23da31e34af17b3998e0f896b74ffb6f to your computer and use it in GitHub Desktop.
Nested Lists
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
| marksheet = [] | |
| for _ in range(0,int(input())): | |
| marksheet.append([input(), float(input())]) | |
| second_highest = sorted(list(set([marks for name, marks in marksheet])))[1] | |
| print('\n'.join([a for a,b in sorted(marksheet) if b == second_highest])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment