python——hasattr()

hasattr() 函数用于判断对象是否包含对应的属性

语法:hasattr(object, name)

原文地址:https://www.cnblogs.com/yfqh/p/10927192.html