Discuss / Python / 作业

作业

Topic source

枫澜-ye

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

def findMinAndMax(L): if L[0] > L[1]: Max = L[0] Min = L[1] else: Max = L[1] Min = L[0]
for i in L: if i >= Max: Max = i else: if i >= Min: continue else: Min = i
return (Min,Max)


  • 1

Reply