Mega Code Archive

 
Categories / Python Tutorial / Operator
 

Is not

x = [1, 2, 3] y = [2, 4] x is not y # Use == to see if two objects are equal, and use is to see if they are identical (the same object).