Python hasattr function is a built-in function that is used to check a specified Object has a specified attribute or not.
Python setattr function is a Python built-in function that is used to set the value of a specified attribute from a specified object.