Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second, much better, simple solution in Clear category for Min and Max by sumeet.lintel
def min(*args, **kwargs):
key = kwargs.get("key", None)
if len(args) == 1:
args = args[0]
sorted_values = sorted(args, key=key)
return sorted_values[0]
def max(*args, **kwargs):
key = kwargs.get("key", None)
if len(args) == 1:
args = args[0]
sorted_values = sorted(args, key=key, reverse=True)
return sorted_values[0]
Jan. 23, 2016