Print(3^5) what this mean in python?? " ^ " what is the name of this operator ? What does this ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Print(3^5) what this mean in python?? " ^ " what is the name of this operator ? What does this ?

28th Oct 2020, 6:40 AM
Naseem Ullah
Naseem Ullah - avatar
2 Answers
28th Oct 2020, 6:43 AM
Abhay
Abhay - avatar
+ 2
a ^ b is called bitwise XOR. The i -th bit of answer is 1 iff the i -th bit of a is not equal to i -th bit of b.
28th Oct 2020, 6:44 AM
Soheil
Soheil - avatar