Subscribe Us

Second Largest Number In Python

Second Largest Number In Python



l=int(input())
arr=list(map(int, input().split()))
arr=list(set(arr))
length_list=len(arr)
arr.sort()
print("set = ",arr)
print("length of set: ",length_list)
print(arr[length_list-2])

Post a Comment

0 Comments