, 'b', 1, 2, 1, 2, 1, 2]
>>> x += range(3)
>>> x
['a', 'b', 1, 2, 1, 2, 1, 2, 0, 1, 2]
>>> x += map(str...>> x
['a', 'b', 1, 2, 1, 2, 1, 2, 0, 1, 2, '0', '1', '2']
使用+=运算符居然能把列表和元组、集合、字典甚至map对象、range对象里的元素连接到一起...: can only concatenate list (not "str") to list
>>> x = x + {1, 2, 3}
Traceback (most recent call last...):
File "", line 1, in
x = x + {1, 2, 3}
TypeError: can only concatenate list...>", line 1, in
x = x + {1:'a', 2:'b'}
TypeError: can only concatenate list (not "dict")