"David Perlman" <[EMAIL PROTECTED]> wrote

> I can't figure out how this would ever work at all.  It seems like
> it's either checking to see whether boolean TRUE is in word2, or 
> else
> it's checking to see whether item is equal to boolean TRUE or FALSE,
> and neither of those should ever be true.

It's doing the latter and since anything that's not 'empty' in
Python evaluates to true we wind up checking whether
true == (item in word)

So if the item is in word we get true == true which is true.

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to