原本的目的是将列表a打乱顺序,生成5个值存在b中。结果发现b中是一个值
```python
import random
a=[1,1,2,2,3,4,5]
b=[]
for i in range (5):
random.shuffle(a)
print(a)
b.append(a)
print(b)
结果:
```python
[2, 2, 1, 1, 5, 4, 3]
[5, 4, 1, 1, 3, 2, 2]
[1, 1, 2, 2, 3, 5, 4]
[2, 1, 4, 5, 1, 3, 2]
[1, 4, 1, 3, 5, 2, 2]
[[1, 4, 1, 3, 5, 2, 2], [1, 4, 1, 3, 5, 2, 2], [1, 4, 1, 3, 5, 2, 2], [1, 4, 1, 3, 5, 2, 2], [1, 4, 1, 3, 5, 2, 2]]