列表中的赋值和平常的赋值是不一样的,看下面的代码: In [1]: a = 1 In [2]: b = a In [3]: a Out[3]: 1 In [4]: b Out[4]: 1 In [5]: id(a) Out[5]: 4452948992 In [6]: id(b) Out[6]: 4452948992 In [7]: id(1) Out[7]: 4452948992 In [8]: a = 4 In [9]: b Out[9]: 1 In [10]: id(a) Out[10]:…