You are viewing a single comment's thread. Return to all comments →
I was trying to convert set to list like you did. But I noticd you could just use sorted() for the set ! Weird, but it works just fine ...
input()
myList = sorted(set(map(int, input().strip().split()))) print(myList[len(myList)-2])
Seems like cookies are disabled on this browser, please enable them to open this website
Find the Runner-Up Score!
You are viewing a single comment's thread. Return to all comments →
I was trying to convert set to list like you did. But I noticd you could just use sorted() for the set ! Weird, but it works just fine ...
input()
myList = sorted(set(map(int, input().strip().split()))) print(myList[len(myList)-2])