if len(L)==0:
return (None, None)
elif len(L)==1:
return (L[0], L[0])
else:
x=L[0]
y=L[0]
for d in L:
if d>x:
x=d
if d<y:
y=d
return (y, x)
Sign in to make a reply
穆临想修改昵称了
if len(L)==0:
return (None, None)
elif len(L)==1:
return (L[0], L[0])
else:
x=L[0]
y=L[0]
for d in L:
if d>x:
x=d
if d<y:
y=d
return (y, x)