[Tutor] trouble with function-- trying to check differences btwn 2 strings
alan.gauld at btinternet.com
Tue Mar 6 23:37:31 CET 2007
"David Perlman" <dperlman at wisc.edu> wrote
> Sorry, but this still doesn't make sense to me.
>>> x=('i' in 'i')
> But the == operator doesn't cast its operands as Booleans;
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
>>> for c in 'abcd':
... print (c == c in 'crab')
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...
More information about the Tutor