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 tokiojapan55
def min_max(ope, *args, **kwargs):
result,key = None,kwargs.get("key", None)
if len(args)==0:
return result
it = list(args) if len(args)!=1 else iter(args[0])
for v in it:
if result==None:
result = v
if key==None:
if ope=='min' and result>v:
result = v
elif ope=='max' and resultkey(v):
result = v
elif ope=='max' and key(result)
June 15, 2020
Comments: