Stuff I might need in the future


I'm in the vacation part of the Python lesson thing and in the example it uses this thing that looks like += and I don't know what it means, I don't think I need it right now, I haven't started to code it yet, but I think it would be useful or necessary later and I would hate to have to go back a lesson or two later to try to find out what it is so if you are going through Q&A and you see this and know the answer, please tell me what it does.


You can simply look it up on the WWW. It's pretty basic

x = 1
x = x + 1
# now x == 2

x += 1
# now x == 3


Hey isyasad, you can find it and other Python operators here:, where it is explained like this:

+= Add AND

It adds right operand to the left operand and assigns the result to left operand

c += a is equivalent to c = c + a