https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions以上是文档,我们摘取 append 部分
```
list.append(x)
Add an item to the end of the list. Equivalent to a[len(a):] = [x].
```
首先: 我们使用[].append 是意味着空的 list 的尾部添加 value,这个是其功能。
然后:文档中给出了样例的,使用[].append[x] 其实等于使用 a[len(a):]=[x],这个操作已经是一个语句了, 但是似乎一个语句包含另一个语句的时候, 还是合理的
```
In [14]: l = l[len(l):]=[x]
In [15]: l
Out[15]: [1, 1]
```
这个现象显然不能解释,于是又看了源码(这个我以后探究一下是什么问题)
```
class list(object):
"""
list() -> new empty list
list(iterable) -> new list initialized from iterable's items
"""
def append(self, p_object): # real signature unknown; restored from __doc__
""" L.append(object) -> None -- append object to end """
pass
def clear(self): # real signature unknown; restored from __doc__
""" L.clear() -> None -- remove all items from L """
pass
def copy(self): # real signature unknown; restored from __doc__
""" L.copy() -> list -- a shallow copy of L """
return []
def count(self, value): # real signature unknown; restored from __doc__
""" L.count(value) -> integer -- return number of occurrences of value """
return 0
def extend(self, iterable): # real signature unknown; restored from __doc__
""" L.extend(iterable) -> None -- extend list by appending elements from the iterable """
pass
def index(self, value, start=None, stop=None): # real signature unknown; restored from __doc__
"""
L.index(value, [start, [stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.
"""
return 0
```
源码的中的注释很明显解释了这个问题,就是说在 list 对象中 append, extend, clear 这些方法都是在逻辑完成之后, 实际返回的都是 None。