0
In python, to shorten assignments like this, a=a+b we use a+=b right? (assuming the variables a & b are pre-defined)
So my question here is, does this work on all operators like %, // & -? Check out my code, thanks ☺️ https://code.sololearn.com/c7u7dyH64NF3/?ref=app
3 Réponses
+ 3
Yes it does work! Feel free to try it out.
Take a look at the documentation of in-place operators in python on sololearn or do a search online.
+ 2
of course.that's absolutely work.you must try it by yourself.coding is about practice and explore any possibilities
0
Okay, thanks man