In python find second largest number entered through keyboard with using for loop
Answers
Answered by
0
Answer:
Given a list of numbers, the task is to write a Python program to find the second largest number in given list. Method 1: Sorting is an easier but less optimal method. Given below is an O(n) algorithm to do the same. Method 2 : Sort the list in ascending order and print the second last element in the list.
HOPE IT HELPS U
Similar questions