Discuss / Python / 我的答案

我的答案

Topic source

信游落

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

    if len(L) == 0:

        return (None, None)

    max = None

    min = None

    for num in L:

      if max == None or num > max:  

          max = num;

      if min == None or num < min:

          min = num;

    return min, max


  • 1

Reply