主页
Python
Python hasattr() 函数
demo_ref_hasattr
运行 ❯
×
更改方向
保存代码
更改主题
class Person: name = "John" age = 36 country = "Norway" x = hasattr(Person, 'age') print(x)
True