Which of the following statements correctly describes the relationship between a class and an object in Python?
Options
-
A.
A class is an instance of an object
-
B.
An object is an instance of a class
-
C.
A class and an object are always identical
-
D.
More than one of the above
-
E.
None of the above
Correct Answer (Detailed Explanation is Below)
B.
An object is an instance of a class
Detailed Explanation
A
class defines the structure and behaviour, whereas an object is an instance created from that class.