Discuss / Python / 这个可以吗?

这个可以吗?

Topic source

友仔

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

def FindMinAndMax(l):

  if len(l)==0:

    return ((None,None))

  elif len(l)==1:

    return ((l[0],l[0]))

  elif len(l)>=2:

    return((min(l),max(l)))

l=[]

FindMinAndMax(l)


  • 1

Reply