Discuss / Python / 我竟然把L==None害我半天没搞懂怎末回事!!!

我竟然把L==None害我半天没搞懂怎末回事!!!

Topic source
 if L==[]:
        return (None,None)
     else:
        t1=L[0]
        t2=L[0]
        for i in L:
           if i<t1:
              t1=i
           if i>t2:
              t2=i
        return (t1,t2)

  • 1

Reply