XOR two bytes?

Bruce Sass bsass at freenet.edmonton.ab.ca
Sat Aug 4 22:38:39 CEST 2001


On Sat, 4 Aug 2001, Jeanne wrote:
> Does anyone know if there is a function to quickly Xor two bytes
> together?
> I have been searching in the docs, but havent' been able to find it.
> Please cc: my cris_paltenghe at yahoo.com address as I don't hang out in
> this newsgroup often.  Thanks for your help! Cris

Is this what you are after...

>>> 0^0
0
>>> 0^1
1
>>> 1^0
1
>>> 1^1
0





More information about the Python-list mailing list