You are viewing a single comment's thread. Return to all comments →
if name == 'main': students=[] for _ in range(int(input())): name = input() score = float(input()) students.append([name,score]) a=[] b=0.0 c=[]
for i in range (0,len(students)): a.append(students[i][1])
a.sort()
for i in range (0, len(a)-1):
if(a[i]<a[i+1]): b=a[i+1] break else: continue
for i in range(0,len(students)): if(students[i][1]==b): c.append(students[i][0])
else: continue
c.sort() for i in range(0,len(c)): print(c[i])
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 →
if name == 'main': students=[] for _ in range(int(input())): name = input() score = float(input()) students.append([name,score]) a=[] b=0.0 c=[]
for i in range (0,len(students)): a.append(students[i][1])
a.sort()
for i in range (0, len(a)-1):
for i in range(0,len(students)): if(students[i][1]==b): c.append(students[i][0])
c.sort()
for i in range(0,len(c)): print(c[i])