"David Perlman" <[EMAIL PROTECTED]> wrote > Sorry, but this still doesn't make sense to me. > >>> x=('i' in 'i') >>> x True >>> y='i' >>> x==y False
> But the == operator doesn't cast its operands as Booleans; Good catch! I don't understand it now either. But I've been up since 4:30am and am too tired to try figuring it out just now, so maybe someone else will explain! :-) >>> for c in 'abcd': ... print (c == c in 'crab') ... True True True False It definitely seems to work as I explained it but how it works is defeating my befuddled brain right now. I suspect it needs a read of the reference manual... Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor