Enhanced assignment operator

python by "=" represents assignment, such as:

a = 100

Operators may also be used in conjunction with the assignment operator The enhanced assignment operator (no intervening space), such as:

# Enhanced assignment operator 
A +. 1 = # corresponds to a = a + 1

There are similar: - =, * =, / =, = // ** =,% =

Guess you like

Origin www.cnblogs.com/doc-wang/p/11839450.html