If your list is sorted, you don't have to iterate over all element to find the nth-max...
if increasing order mx2 = list[-2]
if decreasing order mx2 = list
... until you've only uniques elements in the list.
If values can be repeated in the list, you need to iterate only over a list subpart:
i = len(list)-1 if inc else 0
inc = -1 if inc else 1
M = list[i]
while list[i]==M: i += inc
v0ltr0n no needs to slice before accessing the targeted value...
Francis Sullano using a set imply implicitly to iterate over the whole list (wich could be time expensive for large list and/or numerous call) ;)