Stuff I might need in the future


#1

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.


#2

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


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

x += 1
# now x == 3

#4

Hey isyasad, you can find it and other Python operators here: www.tutorialspoint.com/python/python_basic_operators.htm, where it is explained like this:

+= Add AND

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

Example:
c += a is equivalent to c = c + a