arg1, arg2 :numbers , iterable inputs or more than one inputs key=my_fun : built-in functions or user defined functions based on which the maximum value can be returned.
Return value is the highest value or list with highest positional element (or highest based on the input function).
Getting highest key value pair based on value of the dictionary
Student Name and mark is stored in a dictionary, collect the student who got the highest mark.
Here comparison is done from left to right and based on the position of the first highest element the list is returned as maximum.
Check the below code, since first element is equal in all three lists , the comparison is done based on the 2nd element and the list with highest value at 2nd position is returned by max() function.
We will use one user defined function to find out the last number of the input list and based on this last number we can get the list with highest number.