What is the Singleton pattern in Python?
Correct answer
D. Ensuring a class has only one instance
6 views
D. Ensuring a class has only one instance
6 views
In Python a module is often used as a simple singleton.
Asked in: Python Interview OOP
https://docs.python.org/3/tutorial/classes.htmlNot sure why the answer is D? Ask here and get an explanation.