Discuss / Python / 简单易懂

简单易懂

Topic source

    if len(L)==0:

        return (None,None)

    elif len(L)==1:

        return (L[0],L[0]) 

    else:

        for i in L:

            L_min=min(L)

            L_max=max(L)

            return (L_min,L_max)

公纸晓白

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

你的for循环没有起作用,是多余的


  • 1

Reply