Discuss / Python / def findMinAndMax(L):

def findMinAndMax(L):

Topic source

1090

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

    if len(L)!=0:

      min=L[0]

      max=L[0]

      for i in L:

        if min>i:

           min=i

        if max<i:

          max=i

      return (min,max)

    else:

       return (None, None)


  • 1

Reply