Creating a List of Empty Lists
Francis Avila
francisgavila at yahoo.com
Sat Dec 6 17:17:54 EST 2003
Skip Montanaro wrote in message ...
> The
>correct way to compare two strings is using '==' (which is independent of
>CPython's implementation details), not 'is'.
I think it's better to say that the only time you *use* 'is' is when you
*know* the object you're comparing to is a singleton (None, True, or False).
Every other time, use '=='. And don't be deceived by 'is' working
sometimes.
--
Francis Avila
More information about the Python-list
mailing list