Python Getting numbers of high and Low
Here I am attaching code for your reference .
Python Program for Class 11 CBSE
#Find the largest and smallest numbers in a list.
#Input : list = [12, 45, 2, 41, 31, 10, 8, 6, 4]
#sorted list =[2,4,6,8,20,12,31,98,99]
def find_len(list1):
length = len(list1)
list1.sort()
print("Largest element is:", list1[length-1])
print("Smallest element is:", list1[0])
print("Second Largest element is:", list1[length-2])
print("Second Smallest element is:", list1[1])
Driver Code
list1=[12, 45, 2, 41, 31, 10, 8, 6, 4]
Largest = find_len(list1)
Watch video PYTHON -How To Find the largest and smallest numbers in a list online, duration hours minute second in high quality that is uploaded to the channel Technical RPA 17 August 2020. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 203 times and liked it 0 visitors.