Write a function to print second largest number in a list.


Topic: Write a function to print second largest number in a list.

Solution

def second_large_num(num: list):
    if isinstance(num, list):
        num.sort()
        print (num[-2])
    else:
        raise ValueError('Invalid Input')



List all Python Programs