0

I am reviewing the logical operators in Python. What's the difference between the 'and' operator and the '&' operator?

It seems that '&' is doing a bitwise AND, like 10(1010) & 7(0111) result in 2(0010). But how does the 'and' actually work? Why does 10 & 7 result in 7 in this case? Many thanks in advance!

0 Answers0