Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在阅读“Practical Programming: An Introduction to Computer Science Using Python 3”一书。在第8章(列表)中,书中有一个问题如下:
绘制一个内存模型,显示以下语句的效果 values = [0,1,2] values[1] = values
绘制一个内存模型,显示以下语句的效果
values = [0,1,2] values[1] = values
为什么会print values显示[0, [...], 2]?不应该[0, [0,1,2], 2]吗?
print values
[0, [...], 2]
[0, [0,1,2], 2]