如果您对字节码感到好奇:>>> def L_app( ):
... L.append( 4 )
...
>>> def L_add( ):
... L = L + [ 4 ]
...
>>> def L_add_inplace( ):
... L += [ 4 ]
...
>>> dis.dis( L_app )
2 0 LOAD_GLOBAL 0 (L)
3 LOAD_ATTR 1 (append)
6 LOAD_CONST 1 (4)
9 CALL_FUNCTION 1
12 POP_TOP
13 LOAD_CONST 0 (None)
16 RETURN_VALUE
>>> dis.dis( L_add )
2 0 LOAD_FAST 0 (L)
3 LOAD_CONST 1 (4)
6 BUILD_LIST 1
9 BINARY_ADD
10 STORE_FAST 0 (L)
13 LOAD_CONST 0 (None)
16 RETURN_VALUE
>>> dis.dis( L_add_inplace )
2 0 LOAD_FAST 0 (L)
3 LOAD_CONST 1 (4)
6 BUILD_LIST 1
9 INPLACE_ADD
10 STORE_FAST 0 (L)
13 LOAD_CONST 0 (None)
16 RETURN_VALUE