class Color: def __init__(self, num, nodelist): self.num = num self.nodelist = nodelistdef...colors[('num', 2), ('nodelist', [10, 20])][('num', 3), ('nodelist', [23, 33, 43])]tmp_colors[('num',...2), ('nodelist', [10, 21])][('num', 3), ('nodelist', [23, 33, 43])]2、解决方案为了解决这个问题,我们需要创建一个Color对象的真正的副本...colors[('num', 2), ('nodelist', [10, 20])][('num', 3), ('nodelist', [23, 33, 43])]tmp_colors[('num',...2), ('nodelist', [10, 21])][('num', 3), ('nodelist', [23, 33, 43])]如果我们想以后更新colors[0],我们可以通过将tmp_colors