Given the participants' score sheet for your University Sports Day, you are required to find the runner-up score. You are given scores. Store them in a list and find the score of the runner-up. code example
Example 1: find the runner-up score
n = int(input())
arr = list(map(int, input().split()))
zes = max(arr)
i=0
while(i<n):
if zes ==max(arr):
arr.remove(max(arr))
i+=1
print(max(arr))
Example 2: how to find runner up score in python
price=[10,20,4,5,4,6,46,43,4,64,65,8,45,55,558,15,5,4,6,5,255,5]
price.sort()
price.reverse()
max=price[0]
sec_max=price[1]
print(price)
print(f"the max is {max}, runner up is {sec_max}")