Write a Python function to find the maximum value in a given heterogeneous list using lambda


Topic: Write a Python function to find the maximum value in a given heterogeneous list using lambda

Solution

def max_val(list_val):
     max_val = max(list_val, key = lambda i: (isinstance(i, int), i))  
     return(max_val)
 



List all Python Programs