def findMinAndMax(L):
if len(L)==0:
return (None, None)
else:
return (min(L), max(L))
你的最简洁
这简洁啥用内置函数,这本来就是锻炼写算法
Sign in to make a reply
往事扶着走
def findMinAndMax(L):
if len(L)==0:
return (None, None)
else:
return (min(L), max(L))