Python program to find second largest number in a list
Closed this issue · 2 comments
Pankaj-Str commented
Example : Data [ 10 , 2 , 4 , 5 , 7 , 8 , 9 , 5 ]
Second largest number = 9
gghugare commented
Data = [ 10 , 2 , 4 , 5 , 7 , 8 , 9 , 5 ]
Data.sort()
print("Second largest element is:", sorted(Data)[-2])