pirata wrote:

I'm a bit confusing about whether "is not" equivelent to "!="

if a != b:
  ...

if a is not b:
  ...


What's the difference between "is not" and "!=" or they are the same thing?

The `==` operator tests equality.  The `is` operator tests identity.

If you don't specifically intend to test for identity, use `==`. If you don't know what identity tests are for (with the exception of testing for None-ness), then you don't need it.

--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
 San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
  Do we ask what profit the little bird hopes for in singing?
   -- Johannes Kepler, 1571-1630
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to