Name

+= (add assign)

Examples
a = 50
b = 23
a += b  # Sets 'a' to 73
c = "c"
c += "d"  # Sets 'c' to "cd"
d = [1, 2, 3]
d += [4]  # Sets 'd' to [1,2,3,4]
Description Combines addition with assignment for numbers, concatenation with assignment for strings, and list appending with assignment for lists. The expression a += b is equivalent to a = a + b.
Syntax
value1 += value2
Parameters
value1int, float, list, string
value2any value the same datatype as value1
Related = (assign)
+ (addition)
-= (subtract assign)

Updated on Mon Sep 21 15:53:24 2020.

If you see any errors or have comments, please let us know.