在做项目的过程中,遇到了一个问题,数据保存到字典中,后来发现数据不对,排查了字典的构建过程,是OK的,后来怀疑是别的部分共用了这一个字典,排查代码,发现这里应该是有问题的. score = None deltaScore = result.get('score', [0 for _ in range(4)] if not score: score = deltaScore else: for index in range(4): score[index] += deltaScore[index]