+ 2
What is the in-place operator in python used for?
4 Respuestas
+ 14
In place operator means
+=
-=
/=
*=
Example:-
x+=2 implies x=x+2
If x=5, then x+=2 means x=5+2=7.
https://googleweblight.com/i?u=https://www.geeksforgeeks.org/inplace-operators-JUMP_LINK__&&__python__&&__JUMP_LINK-set-1iadd-isub-iconcat/&grqid=1-dZsTUO&s=1&hl=en-IN
+ 4
The documentation is here, paragraf 9.3.2:
https://docs.python.org/3.2/library/operator.html
+ 2
It is shorter code. Always?
0
Thank you guys, but sorry i mean the question is when i use in place operator? In what conditions i should use it? Sorry for my bad english