C++ 和 python 中运算符 & 和 == 的优先级
C++
C++运算符优先级表[中文版](http://c.biancheng.net/cpp/biancheng/view/2079.html)
==(等于)比 &(按位与)优先级更高
Python运算符优先级和结合性一览表(http://c.biancheng.net/view/2190.html)
&(按位与)比 ==(等于)优先级更高
所以一切不能绝对确定优先级的操作就用小括号()括起来就对了。

C++ 和 python 中运算符 & 和 == 的优先级
C++运算符优先级表[中文版](http://c.biancheng.net/cpp/biancheng/view/2079.html)
==(等于)比 &(按位与)优先级更高
Python运算符优先级和结合性一览表(http://c.biancheng.net/view/2190.html)
&(按位与)比 ==(等于)优先级更高
所以一切不能绝对确定优先级的操作就用小括号()括起来就对了。