发布于2019年9月25日 由shijingleiPython hasattr()函数 用于判断对象是否包含对应的属性 。 hasattr(object, name) object 对象,name 字符串