1.

What is getattr() used for?(a) To access the attribute of the object(b) To delete an attribute(c) To check if an attribute exists or not(d) To set an attribute

Answer» The correct choice is (a) To access the attribute of the object

Easy explanation - getattr(obj,name) is used to get the attribute of an object.


Discussion

No Comment Found