How to know if an object has an attribute in Python How to know if an object has an attribute in Python python python