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

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

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