Creating a List of Empty Lists

Francis Avila francisgavila at
Sat Dec 6 23:17:54 CET 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
Francis Avila

More information about the Python-list mailing list