People often use Python You'll find that there are some common operations , For example, concatenate and repeat sequence containers . stay Python in , Mainly through the plus sign （+） And the multiplier （*） To achieve .
+ and * Operate on the container
Python Compiler developers use + and * To realize the serial operation of the sequence container . When we use + In series , Generally, two parameters are required to be Sequence container objects of the same type , When the stitching is finished, a new object is created , It doesn't affect the original object .
To splice multiple identical objects , May adopt * To operate ：
>>> l = [1, 2, 3]
>>> l * 5
[1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]
>>> 5 * 'abcd'
No matter what + or * After the operation , It's all about regenerating a