i += 1
This adds one to i. There is a whole host of these augmented operators (-=, *=, /=, %= etc).
Aside: I used to call these assignment operators which is the C terminology, but in Python assignment is a statement, not an expression (yay!): you can’t go while i -= 1 (and this is a Good Thing).
An augmented assignment like i += 1 is often described as being the same as i = i + 1, except that i can be a complicated expression and it will not be evaluated twice.
As Julian Todd pointed out to me (a couple of years ago now), this is not quite right when it comes to lists.
Recall that when p and q are lists, p + q is a fresh list that is neither p nor q:
>>> p = 
>>> q = 
>>> r = p + q
>>> r is p
>>> r is q
So p += q should be the same as p = p + q, which creates a fresh list and assigns a reference to it to p, right?
No. It’s a little bit tricky to convince yourself of this fact; you have to keep a second reference to the original p (called op below):
>>> p = 
>>> op = p
>>> p += 
>>> p is op
Because of this, it’s slightly harder to explain how the += assignment statement behaves. For numbers we can explain it by breaking it down into a + operator and an assignment, but for lists this explanation fails because it doesn’t explain how p (in our p += q example) retains its identity (the curious will have already found out that+= is implemented by calling the __iadd__ method of p).
What about tuples?
When p and q are tuples the behaviour of += is more like numbers than lists. A fresh tuple is created. It has to be, since you can’t mutate a tuple.
The keen may wish to fill in this table:
|p||q||p + q||p += q|