for i in range(10): if L[i]>max1: max1=L[i] elif L[i]!= max1 and L[i]> max2: max2=L[i] print(max1,max2)