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