if len(L)==0:
return (None, None)
else:
a=b=L[0]
for item in L:
if a>item:
a=item
if b<item:
b=item
return (a,b)
Sign in to make a reply
嗨养车
if len(L)==0:
return (None, None)
else:
a=b=L[0]
for item in L:
if a>item:
a=item
if b<item:
b=item
return (a,b)