Discuss / Python / 练习

练习

Topic source

ClearIight

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

def findMinAndMax(L):

M = (None, None)]

if len(L)!=0:

min = L[0]
max = L[0]
for x in L:
if min > x:
min = x
if max < x:
max = x
M = (min, max)

return M


  • 1

Reply