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])
Copyright (c) 2021 - 2024 Sky Carrer Guidance All Right Reseved
0 Comments