+ 1
How to check class instances?
Pls how do I check all the instances created from a class. E. g: class Sololearner: def ask(self): print(questions) Elijah = Sololearner() Jan-Markus = Sololearner() Input: #function I'm looking for Output: Elijah, Jan-Markus
2 Réponses
0
Thanks man. The reason i wanted to do this is, I created a class and some subclasses of it and i started to create many objects from it and lost track of them. So i started to look for function which when i run, will produce all the instances i've created. P.S I don't really understand anything in your code 😥😥 a few comments will help