主页
Python
Python 位运算符
demo_oper_bitwise_and
运行 ❯
×
更改方向
保存代码
更改主题
# The & operator compares each bit and set it to 1 if both are 1, otherwise it is set to 0 # 6 = 0110 # 3 = 0011 # -------- # 2 = 0010 print(6 & 3)
2