Why can't I xor strings?

Grant Edwards grante at visi.com
Fri Oct 8 21:45:33 EDT 2004


On 2004-10-09, Steven Bethard <steven.bethard at gmail.com> wrote:
> Grant Edwards <grante <at> visi.com> writes:
>
>> No, he wants to do an exclusive or of the boolean values of the
>> strings.
>
> I'm guessing the OP has already guessed this solution from the
> variety already provided, but the direct translation of this
> statement would be:
>
> bool(x) ^ bool(y)

:)

It dawned on me later that perhaps the jump from what I wrote
to the code you wrote wasn't as obvious as I thought.

-- 
Grant Edwards                   grante             Yow!
                                  at               TAILFINS!!... click...
                               visi.com            



More information about the Python-list mailing list