Performance | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Performance

I want to figure out what's the good practices when coding python, like at the example of the exercise, we have different ways to make the same process. Example 1: x=7 x+=2 Example 2: X=7 X = x +2 Processing speaking does it have any differences at these two examples, if so how can I know when use one or other.

14th Dec 2018, 12:43 AM
Gabriel Gaboardi
Gabriel Gaboardi - avatar
1 Answer
+ 2
That's just sintatic sugar so there's no performance difference between those two instructions
14th Dec 2018, 1:19 AM
Chriptus13
Chriptus13 - avatar