Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Shorter solution in Clear category for Min and Max by maxadamski
def sorted2(args, kwargs, reverse):
list = args[0] if len(args) == 1 else args
key = kwargs.get("key", None)
return sorted(list, key=key, reverse=reverse)[0]
def min(*args, **kwargs):
return sorted2(args, kwargs, False)
def max(*args, **kwargs):
return sorted2(args, kwargs, True)
Oct. 21, 2017