我不明白之间的差别&和and,即使我读了一些关于它的其他问题.
&
and
我的代码是:
f=1 x=1 f==1 & x==1 Out[60]: True f==1 and x==1 Out[61]: True f=1 x=2 f==1 and x==2 Out[64]: True f==1 & x==2 Out[65]: False
为什么它是第二个& False,而第一个是True?
False
True
python bitwise-operators logical-operators
bitwise-operators ×1
logical-operators ×1
python ×1