What does the &= operator mean in Python, and can you give me a working example?
&=
I am trying to understand the __iand__ operator.
I just d
It is a shorthand for:
a = a & b
& is bitwise and (see link for further explanation) if a and b are either int or long.
&
a
b
int
long
Otherwise, the statement is equivalent to:
a = a.__iand__(b)
if __iand__ is defined for a.
__iand__