Discuss / Python / 交作业

交作业

Topic source

水滴竹沙

#1 Created at ... [Delete] [Delete and Lock User]

deffindMinAndMax(L):

iflen(L)==0:

        a=b=None

else:

        a=b=L[0]

for x in L:

if x>a:

                a=x

elif x<b:

                b=x

return b,a


  • 1

Reply