Vidyalelo
Python · Q22

Classes and Objects in Python

Programming · Python · question 22

Q22

What is the difference between a class variable and an instance variable in Python?

A.
A class variable is shared among all instances of a class, while an instance variable is unique to each instance
Answer
B.
They are the same
C.
An instance variable is shared among all instances
D.
A class variable is unique to each instance

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board