Home » Programming » Python
XOR (Exclusive Or) in Python
This article explains XOR (Exclusive Or) – what it is, why it’s used, and how to implement it in the Python programming language. What is XOR / Exclusive OR XOR – Exclusive Or – is a logical operation commonly used in computer programming. Logically, an XOR condition is true only if the supplied arguments differ. XOR compares two inputs and outputs, true or false, only if they are different. Those inputs are usually true/false boolean values or the result of a logical operation that returns a boolean value. For example, XOR on two values – 1 and 1 is false – they do not differ. XOR on two values … Read more