# -*- coding:utf-8 -*- class Course: language = ['Chinese'] def __init__(self,teacher): self.teacher = teacher python = Course('lin') linux = Course('yao') python.language = ['EN'] #重新赋值是独立的 print(Course.language) print(python.language) print(python.__dict__) print(Course.language) print(linux.__dict__) print(linux.language) del python.language #删除属性 python.language[0] = 'EN' #通过list修改,修改是共享的 print(Course.language) print(linux.language) print(python.language)