Back to Study material
object oriented programming| unit 4 classes and data abstraction MCQs
Difficulty: Easy
Question 1/5
Question 1
What is hasattr(obj,name) used for?
To check if an attribute exists or not
To access the attribute of the object
To delete an attribute
To set an attribute