xor operator

Dom Grigonis dom.grigonis at gmail.com
Mon Nov 13 19:28:12 EST 2023


> Except the 'any' and 'all' builtins are _exactly_ the same as bitwise
> or and and applided to many bits. To do something "in line" with that
> using the 'xor' operator would return True for an odd number of True
> values and False for an even Number of True values.

Fair point.

Have you ever encountered the need for xor for many bits (the one that I am NOT referring to)? Would be interested in what sort of case it could be useful.


More information about the Python-list mailing list