We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
if __name__ == '__main__':
students = []
marksList = []
for _ in range(int(input())):
name = input()
marks = float(input())
students.append([name, marks])
marksList.append(marks)
secondLowestScore = sorted(set(marksList))[1]
x = [sname for sname, marks in students if marks == secondLowestScore]
for _ in sorted(x):
print(_)
Nested Lists
You are viewing a single comment's thread. Return to all comments →