Difference between 'is not' and '!=' ?

Christian Heimes lists at cheimes.de
Mon May 10 19:32:45 EDT 2010


AON LAZIO wrote:
> As subject says, what is the differences of 'is not' and '!='. Confusing..

"is not" checks if two objects are not identical. "!=" checks if two 
objects are not equal.

Example:
Two apples may be equal in size, form and color but they can never be 
identical because they are made up from different atoms.

Christian




More information about the Python-list mailing list