1

For example:

class A:
    pass


a = A()
b = A()
c = A()

if there are class A and A's instance a, b and c.

what I want to do is get a list of [a, b, c] which are instances of A.

Thank you.

Hyuenjun
  • 59
  • 5
  • There's nothing that does this automatically. If you want a list of all A's, the `__init__` method should append `self` to the list. – Barmar Dec 29 '20 at 05:24

0 Answers0