Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Min and Max solution in Clear category for Min and Max by michal_bien
def id(arg):
return arg
def min(*args, **kwargs):
cle = kwargs.get("key", None)
elements=args[0]
if len(args)>1:
elements = list(args)
m = None
if cle==None: cle=id
for element in elements:
if m==None:
m=element
elif cle(element)1:
elements = list(args)
m = None
if cle==None: cle=id
for element in elements:
if m==None:
m=element
elif cle(element)>cle(m):
m=element
return m
Oct. 9, 2016