Python hasattr() Function - W3Schools
www.w3schools.com › python › ref_func_hasattrThe hasattr () function returns True if the specified object has the specified attribute, otherwise False. Syntax hasattr ( object, attribute ) Parameter Values Related Pages The delattr () function, to remove an attribute The getattr () function, to get the value of an attribute The setattr () function, to set the value of an attribute