(Feb-26-2019, 06:08 PM)nilamo Wrote: You definitely can.total = 0 total += 5 total += 1 + 2 + 3 + 4 + 5 print(total) # 20
So you're saying that you can't actually just say += += += +=... you only get to use a single +=. But then, if you do want to daisy chain, you have to just use + by itself. I wonder why they wouldn't put that in the lesson. Probably not to confuse us newbs.
How about this one: In the pic below, why is the aqua colored def the right one? Doesn't that usually mean that something is wrong? Can someone please explain why one def is a different color, and why that one is correct? (once again this is from a code academy lesson)