I am quite experienced with Python, but recently, when I was looking at the solutions for the codility sample tests I encountered the operators -=
, +=
, ^=
and I am unable to figure out what they do. Perhaps could anyone explain the context in which they are used?
As almost any modern language, python has Assignment Operators so they can use them every time you want to assign a value to a variable after doing some arithmetic or logical operation, both (assignment and operation)are expressed compact way in one statement....