python——hasattr()

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

语法:hasattr(object, name)

猜你喜欢

转载自www.cnblogs.com/yfqh/p/10927192.html