python数组类变量内的数组数据被同时修改了,该怎么解决

代码如下:

class Student:
    name = ''
    score = []
    def __init__(self):
        pass

def main():
    all = []
    all.append(Student())
    all.append(Student())
    all[0].name = 'YYY'
    all[1].name = 'XXX'
    all[0].score.append(75)
    all[1].score.append(85)
    print(all[0].score, all[1].score)

if __name__ == "__main__":
    main()

为什么print出来的是([75, 85], [75, 85]),数据被同时修改了。
请问如何让变量指向不同的地址?即我希望得到([75],[85]),谢谢!

不要把score和name定义类属性,而是要定义为对象属性,即:

class Student:
    def __init__(self):
        self.score=[]
        self.name=''

就可以了