python check if attribute exists inside class code example Example: python hasattribute hasattr(object, name)