Python Xor

Description

Python program to Illustrate xor operator (A xor A ==> 0)
Sample Input 1:
6
Sample Output 1:
0
Input2:
28
Output2:
0

Solution

num=int(input("enter the number:"))
num=num^num
print("num value is :{}".format(num));

Explanation

XOR any value with the same produces zero.