python check to see if object has keys code example Example: python check if has attribute if hasattr(a, 'property'): a.property