Aug-10-2019, 08:13 PM
(Aug-10-2019, 08:05 PM)DavidTheGrockle Wrote: "Assignment Operator x += 3 is the same as x = x + 3" Why would I bother with the assignment operator ?
x += 3 is just shorthand for x = x + 3. It's a common operation, so they made it easier. You can use it or not as you wish.
(Aug-10-2019, 08:05 PM)DavidTheGrockle Wrote: I still cannot figure out the underlying point.
The underlying point is that there are two different things going on. One is assigning a value to a variable, and the other is comparing two values to see if they are the same. Python, like many languages, uses two different symbols to represent this.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures