Python a &= b meaning?
问题 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 don't know what &= means and have looked online but couldn't find it. 回答1: Explanation Understandable that you can't find much reference on it. I find it hard to get references on this too, but they exist. The i in iand means in-place , so it's the in-place operator for & . &= calls the __iand__ operator, if it is implemented. If not implemented, it is the