Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 2
An assignment has a return value.
For ++a it is the new value, for a++ the old one.
This can be convenient: You can print out the old value AND increase a 'at the same time'.
If you write a=a++, though...
You increase a, but the process returns the OLD a, and then you store it in a.
So basically you increase a, then directly cancel it out by writing the old value into a again.