On Wed, Jul 1, 2009 at 5:29 PM, Robert Berman <berma...@cfl.rr.com> wrote:

> > >>> n = "colourless"
> > >>> o = "colourless"
> > >>> n == o
> > True
> > >>> n is o
> > True
> > >>> p = "green ideas"
> > >>> q = "green ideas"
> > >>> p == q
> > True
> > >>> p is q
> > False
> >
> > Why the difference?
>
> The string p is equal to the string q. The object p is not the object q.
>
> Robert
>
Yes, but did you read his first example?  That one has me scratching my
head.
-- 
www.fsrtechnologies.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to