Answers for "hackerrank nested list solution"

1

hackerrank nested list solution

# Nested Lists in Python - Hacker Rank Solution  # python2 solutionscore_list = []; # do not forget to declare a list
for _ in range(int(raw_input())):
    name = raw_input()
    score = float(raw_input())
        # Nested Lists in Python - Hacker Rank Solution START
    score_list.append([name, score])
second_highest = sorted(set([score for name, score in score_list]))[1]
print('\n'.join(sorted([name for name, score in score_list if score == second_highest])))# Nested Lists in Python - Hacker Rank Solution END
Posted by: Guest on June-03-2021

Code answers related to "hackerrank nested list solution"

Browse Popular Code Answers by Language