print(2 & 3)
I came across a problem statement in one of my technical assessments, I can't understand the usecase of this '&' operator. Can anyone help me, with how this & operator work in python3
print(2 & 3)
I came across a problem statement in one of my technical assessments, I can't understand the usecase of this '&' operator. Can anyone help me, with how this & operator work in python3
&
is a bitwise operator, so this is simply where the binary bits line up between2
and3
https://wiki.python.org/moin/BitwiseOperators
Here's an example with some bigger numbers