You are viewing a single comment's thread. Return to all comments →
even more compact. is it pythonic?
students = [[input(),float(input())] for _ in range(int(input()))]
print(*(sorted([x[0] for x in students if x[1] == sorted({x[1] for x in students})[1]])),sep='\n')
Nested Lists
You are viewing a single comment's thread. Return to all comments →
even more compact. is it pythonic?
students = [[input(),float(input())] for _ in range(int(input()))]
print(*(sorted([x[0] for x in students if x[1] == sorted({x[1] for x in students})[1]])),sep='\n')