I found this code on this site to find the second largest number:
def second_largest(numbers): m1, m2 = None, None for x in numbers: if x >
a = [6,5,4,4,2,1,10,1,2,48] s = set(a) # used to convert any of the list/tuple to the distinct element and sorted sequence of elements # Note: above statement will convert list into sets print sorted(s)[1]