Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
sorted args&kwargs solution in Clear category for Min and Max by spoty
arguments = lambda args: args if len(args) > 1 else args[0]
def min(*args, **kwargs):
key = kwargs.get("key")
return sorted(arguments(args), key=key)[0]
def max(*args, **kwargs):
key = kwargs.get("key")
return sorted(arguments(args), key=key, reverse=True)[0]
Feb. 1, 2015
Comments: