ExamVeda
Login
Home
Advanced OOP Concepts
?

What is the purpose of the __slots__ attribute in Python classes?

Answer & Solution
Correct Answer: Option B
The __slots__ attribute restricts the attributes that can be added to instances, optimizing memory usage.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.