Tupple to find the second, third max and min of the data input

suppose t=(34,27,45,6987,985)
how to find the second,third max and min .

First you will need to pass the tuple to sort() function in order to get a sorted way so index 0 will contain the smallest number and the last index will contain the maximum number(i.e its index will be -1), So 2nd largest number will be at an index of -2 and the 3rd largest will be at -3 index .
We are writing the -ve sign because we want to access our items from the end of the tuple/list.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.