You are viewing a single comment's thread. Return to all comments →
Great solution. Because this is what happens if it is not pythonic at all!
if __name__ == '__main__': final = [] n = int(input()) for _ in range(n): name = input() score = float(input()) final.append([score,name]) final.sort() k = 0 for x in range(n): if final[x][0] > final[0][0]: k = x break for x in range(n): if final[k][0] == final[x][0]: print(final[x][1])
I have k = 0 for the case all students have the same grade, so the solution is all of them.
Seems like cookies are disabled on this browser, please enable them to open this website
Nested Lists
You are viewing a single comment's thread. Return to all comments →
Great solution. Because this is what happens if it is not pythonic at all!
I have k = 0 for the case all students have the same grade, so the solution is all of them.