getattr 返回一个对象的属性值 getattr(apple,"price") setattr 设置对象属性值,该属性必须存在 setattr(apple,"price",10) 引用 Python getattr() 函数Python setattr() 函数