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 m600
def min(*args, **kwargs):
key = kwargs.get("key", None)
if len(args)==1:
args=args[0]
args = list(args)
args = sorted(args, key=key)
return args[0]
def max(*args, **kwargs):
key = kwargs.get("key", None)
if len(args)==1:
args=args[0]
args = list(args)
args = sorted(args, key=key, reverse=True)
return args[0]
June 22, 2015