Discuss / Python / 。

frantumaglia

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

def findMinAndMax(L):
if not L: return (None,None) maxi = L[0] mini = L[0] for i in L: if i>maxi: maxi = i if i<mini: mini = i return (mini,maxi)


  • 1

Reply