The hasattr() function is a built-in Python function that checks whether an object has an attribute (or property) with a given name. It returns True if the object has the specified attribute, and False otherwise.
congrats on reading the definition of hasattr(). now let's actually learn it.