What is setattr() used for?
(a) To access the attribute of the object
(b) To set an attribute
(c) To check if an attribute exists or not
(d) To delete an attribute
This question was addressed to me in exam.
The doubt is from Classes and Objects topic in chapter Classes and Objects, Inheritance, Polymorphism, Encapsulation and Exception Handling of Python