lundi 2 mars 2020

What is the difference between (not digits) and (digits is None) where digits is a string?

The difference between

 def letterCombinations(self, digits: str) -> List[str]:
            if(not digits):
                return(None)

and

 def letterCombinations(self, digits: str) -> List[str]:
                if(digits is None):
                    return(None)

Aucun commentaire:

Enregistrer un commentaire