Find the Runner-Up Score!

  • + 0 comments

    Guys,i have a simple code for that :-

    n = int(input())
    arr = map(int, input().split())
    arr =list(set(arr))                        #list(set()) is used for eliminating numbers     arr=sorted(arr)                         #sorted() is used for ascending order 
    print(arr[-2])                              #[-2] for last second number
    

    **May God fulfill all your dreams.