📜  python 获取对象的属性 - Python 代码示例

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

代码示例5
field_name = "fullName"
print getattr(user, field_name) # prints content of user.fullName