How can I know if an object has some attribute in Python, Is there a way to do it?
E.g.
>>> q = SomeClass()
>>> q.someProperty = value
>>> q.property
Traceback (most recent call last):
File "", line 1, in
AttributeError: SomeClass instance has no attribute 'property'
so, How can I know that q has the attribute property before using it in syntax?
Select the correct answer from above options