📜  python使用字符串获取对象属性 - Python代码示例

📅  最后修改于: 2022-03-11 14:45:47.272000             🧑  作者: Mango

代码示例1
#There are built-in functions called getattr and setattr
getattr(object, attrname)
setattr(object, attrname, value)