Discuss / Python / 作业

作业

Topic source

燕喜泥润

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

def findMinAndMax(L):

if len(L)==0:

return(None,None)

else:

Min=L[0]

Max=L[0]

for i in L:

if i>Max:

Max=i

elif i<Min:

Min=i

return(Min,Max)


  • 1

Reply