Skip to content

Instantly share code, notes, and snippets.

@gt50
Created July 28, 2017 00:17
Show Gist options
  • Save gt50/c8f756b159d6dae9246c2cd2bb1db8c8 to your computer and use it in GitHub Desktop.
Save gt50/c8f756b159d6dae9246c2cd2bb1db8c8 to your computer and use it in GitHub Desktop.
if __name__ == '__main__':
students = []
for _ in range(int(input())):
name = input()
score = float(input())
students.append([name, score])
students.sort(key = lambda x: (x[1], x[0]))
for student in students:
if (student[1] == students[1][1]):
print(student[0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment