```python
>>> a = [['a']]
>>> a.append(1)
>>> id(1)
94887599014656
>>> id(a[1])
94887599014656
>>>
>>> list = [1,12,'a']
>>> a.append(list)
>>> a
[['a'], 1, [1, 12, 'a']]
>>> id(a) == id(list)
False
>>> id(a[2]) == id(list)
True
>>> list.append(20)
>>> list
[1, 12, 'a', 20]
>>> a
[['a'], 1, [1, 12, 'a', 20]]
>>>
>>>
>>> a.append(list[:])
>>> a
[['a'], 1, [1, 12, 'a', 20], [1, 12, 'a', 20]]
>>> list.append(30)
>>> list
[1, 12, 'a', 20, 30]
>>> a
[['a'], 1, [1, 12, 'a', 20, 30], [1, 12, 'a', 20]]
>>> id(list)
140402674396368
>>> id(a[3])
140402673548016
>>>
注意list.append(obj),添加的是对象的引用 看以上代码的id()即可理解其添加都指向同一地址,在最后list[:]相当于切片 创建了一个新的对象传入,如a不会随之改变
python·根据内存地址获取对应内容
利用ctype
```python
>>> import ctypes
>>>
>>> get_value = ctypes.cast(140402673548016, ctypes.py_object).value
>>> get_value
[1, 12, 'a', 20]
>>>