Find the Runner-Up Score!

  • + 2 comments
    num = int(input())
    arr = list()
    arr = [int(i) for i in input().split(" ")]
    arr.sort()
    length = len(arr)
    for j in range(length-1, 0, -1):
        if arr[j] - arr[j-1] == 0:
            pass
        else:
            s_elem = arr[j-1]
            print("Second Largest element", s_elem)
            break