^=, -= and += symbols in Python

前端 未结 2 1633
清歌不尽
清歌不尽 2021-02-01 06:46

I am quite experienced with Python, but recently, when I was looking at the solutions for the codility sample tests I encountered the operators -=, +=,

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-01 07:00

    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....

提交回复
热议问题