Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
'x&=5'
像这样是什么意思:x&=3是什么意思&=,是什么&=意思?
x&=3
&=
基本上,x+=y== x = x+y[*] 和许多其他运算符相同。
x+=y
x = x+y
这意味着您x&=5的与 相同x = x&5。
x&=5
x = x&5
那是什么&?这是一个按位的“和”。您可以在此处阅读有关按位运算符的更多信息。
&
&5基本上从您的x.
&5
x
笔记:
[*] 实现并不总是相同的。+=on lists 修改当前列表,而不是使用总和创建一个新列表并将其分配给名称。但是效果是一样的。
+=