Created
February 23, 2017 06:32
-
-
Save rjshekar90/74b1e3b2010cdf2e0b8a4a3444a40920 to your computer and use it in GitHub Desktop.
This file contains 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
#Hackerrank ------ Nested Lists | |
from collections import defaultdict | |
grades = defaultdict(list) | |
for _ in range(input()): | |
name = raw_input() | |
score = float(raw_input()) | |
grades[score].append(name) | |
print "\n".join(sorted(grades[sorted(grades.keys())[1]])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment