Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Min and Max by frantisek.jahoda
from functools import reduce
from operator import ge, le
def max(*args, key=None):
return min(*args, key=key, cmp=ge)
def min(*args, key=None, cmp=le):
key = key or (lambda x: x)
if len(args) == 1:
args = args[0]
return reduce(lambda a, b: a if cmp(key(a), key(b)) else b, args)
April 29, 2016