I am new in Python before I have only Java experience , In python I need to invoked parameter constructor while I have many class and class name identifies on runtime so I need to create that class Object with constructor and as well method. with static it is working fine. for java I can use class.forName(class_name). I tried with importlib, string to class but did not work.
Excample:
class A
def _init_(self,name):
self.name = name
def some_method(self):
print('method print',self.name)
Expectation: want to achieve-
instance = A('instance A')
instance.some_method()
in the above code class A will be identified on Run time and similar many class we have and above code I need to implement dynamically, how can achieve this.